[Vtigercrm-developers] extend Validation engine
Uma S
uma.s at vtiger.com
Thu Feb 12 06:17:58 GMT 2015
Hi Alan,
*One question, does this validation engine care about the view? What I mean
is is the validation the same for Edit and for Detail views?*
Yes, this validation will take care of views. Because these validations
files are loaded in Basic.php (modules/Vtiger/views) which is loaded in all
the views.
Thanks! for notification about Vtiger_EmailValidator_Js.
Currently, we are using EmailValidator defined in modules/Vtiger/resources/
validator/FieldValidator.js and validator in EmailValidator is no where
used.
I have noted this here in trac
<http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/8462>, will look into this
on the go.
On Wed, Feb 11, 2015 at 8:10 PM, Alan Lord <alanslists at gmail.com> wrote:
> On 11/02/15 10:23, Uma S wrote:
>
>> Alan,
>>
>> Hope, you can get standard validators of a field dynamically by making
>> a call to Vtiger_Base_Validator_Js.getValidator() api by passing the
>> element.
>>
>> Please check getValidator() api in BaseValidator.js
>> (modules/Vtiger/resources/validator).
>>
>
> Thanks Uma, this is starting to make sense... I am now able get a list of
> current validations for any field I want on a module. One question, does
> this validation engine care about the view? What I mean is is the
> validation the same for Edit and for Detail views?
>
> Also, I wanted to note something before I forgot it - I think there might
> be an issue in vtiger...
>
> There is modules/Vtiger/resources/validator/FieldValidator.js and in that
> file is a class
>
> "Vtiger_Base_Validator_Js("Vtiger_Email_Validator_Js",{"
>
> There is *also* a file modules/Vtiger/resources/validator/EmailValidator.js
> which contains a class
>
> "Vtiger_BaseValidator_Js("Vtiger_EmailValidator_Js",{},{"
>
> These would appear to be doing the same thing but with slightly different
> classnames so I wonder why there are two?
>
> Alan
>
>
>
>
>
>
>
>
>
> _______________________________________________
> http://www.vtiger.com/
>
--
With
Best Regards
Uma.S
Vtiger Team
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20150212/a9bd8234/attachment-0001.html>
More information about the vtigercrm-developers
mailing list