<div dir="ltr">Hi Alan,<div><br></div><div>For a field if we have <span style="font-size:13px">data-validator attribute, then this will be used as one of the validator for field validation and is by default triggered by BaseVaildator.</span></div><div><span style="font-size:13px"><br></span></div><div><span style="font-size:13px">But in your case you need to call invokeValidation static api </span><span style="font-size:13px">Glob</span><span style="font-size:13px">alPhoneCheck jQuery class.</span></div><div><span style="font-size:13px"><br></span></div><div><span style="font-size:13px">We do have similar example in vtiger open-source in file (layouts/vlayout/modules/CustomView/resources/CustomView.js) within </span>registerEvents() api, we are making call to Vtiger_MultiSelect_Validator_Js.invokeValidation() which is defined in FieldValidator.js.</div><div><br></div><div>Please refer this, hope this might help.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 25, 2015 at 3:35 PM, Alan Lord <span dir="ltr"><<a href="mailto:alanslists@gmail.com" target="_blank">alanslists@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 25/02/15 09:33, Uma S wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
With regard to invokeVaidation() api, how you are calling this api?<br>
Usually static api's need to called using class_name as you know :) like<br>
this Vtiger_GlobalPhoneCheck_<u></u>Validator_Js.invokeValidation(<u></u>)<br>
<br>
</blockquote>
<br></span>
Thanks Uma,<br>
<br>
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:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<input type="text"<br>
</blockquote>
    data-validator="[{"name":"<u></u>GlobalPhoneCheck"}]"<br>
<br>
data-fieldinfo="{"mandatory":<u></u>true,"presence":true,"<u></u>quickcreate":true,"<u></u>masseditable":true,"<u></u>defaultvalue":false,"type":"<u></u>phone","name":"phone","label":<u></u>"Primary Phone"}"<br>
    value="830780222811"<br>
    name="phone"<br>
    data-validation-engine="<u></u>validate[ required,funcCall[Vtiger_Base_<u></u>Validator_Js.invokeValidation]<u></u>]"<br>
    class="input-large" id="Leads_editView_fieldName_<u></u>phone"<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
</blockquote>
<br>
So how can I change the classname that is set in the data-validation-engine attribute?<br>
<br>
Alan<br>
<br>
<br>
______________________________<u></u>_________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">With<br>Best Regards<br>Uma.S<br><div>Vtiger Team</div></div></div>
</div>