[Vtigercrm-developers] extend Validation engine (Ajax)

Alan Lord alanslists at gmail.com
Wed Feb 25 10:05:52 GMT 2015


On 25/02/15 09:33, Uma S wrote:
>
> With regard to invokeVaidation() api, how you are calling this api?
> Usually static api's need to called using class_name as you know :) like
> this Vtiger_GlobalPhoneCheck_Validator_Js.invokeValidation()
>

Thanks Uma,

So how can I do this? When I add my validation to the the Field.php it 
sets the code in the field like this:

> <input type="text"
     data-validator="[{"name":"GlobalPhoneCheck"}]"
 
data-fieldinfo="{"mandatory":true,"presence":true,"quickcreate":true,"masseditable":true,"defaultvalue":false,"type":"phone","name":"phone","label":"Primary 
Phone"}"
     value="830780222811"
     name="phone"
     data-validation-engine="validate[ 
required,funcCall[Vtiger_Base_Validator_Js.invokeValidation]]"
     class="input-large" id="Leads_editView_fieldName_phone"
>

So how can I change the classname that is set in the 
data-validation-engine attribute?

Alan




More information about the vtigercrm-developers mailing list