[Vtigercrm-developers] extend Validation engine
Uma S
uma.s at vtiger.com
Wed Feb 11 10:23:03 GMT 2015
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).
On Wed, Feb 11, 2015 at 3:25 PM, Alan Lord <alanslists at gmail.com> wrote:
> On 11/02/15 09:49, Alan Lord wrote:
>
>> On 11/02/15 09:25, Uma S wrote:
>>
>
> For example : Please check Vtiger_Percentage_Validator_Js in
>>> FieldValidator.js (modules/Vtiger/resources/Validator) which is making
>>> use of Positive number validator.
>>>
>>
>> Yes, I think this makes sense now.
>>
>
> Ahh, but hang on.
>
> I think tat this assumes that I *know* the "standard" validation rule for
> a field already...
>
> So I'm going to need to do some hacking in the Field Model to get the
> "standard" validation first and remember that somehow so that I can then
> extend my Validator_Js class with the correct parent. Question is, how to I
> dynamically do that?
>
> Al
>
>
> _______________________________________________
> 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/20150211/67986616/attachment.html>
More information about the vtigercrm-developers
mailing list