[Vtigercrm-developers] extend Validation engine
Alan Lord
alanslists at gmail.com
Wed Feb 11 14:40:13 GMT 2015
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
More information about the vtigercrm-developers
mailing list