<div dir="ltr">Sure Alan! you can handle this define the custom validation that need to be performed in module specific js file which should extend standard validator (<span style="font-size:13px">Vtiger_PhoneValidator_Js</span>). So that during validation you can call parent class validate() api to perform standard validation on field.<div><br></div><div>For example : Please check Vtiger_Percentage_Validator_Js in FieldValidator.js (modules/Vtiger/resources/Validator) which is making use of Positive number validator.<br><div><br></div><div>Hope, I made the point clear.</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 11, 2015 at 2:04 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">On 11/02/15 08:22, Uma S wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Alan,<br>
<br>
/If I want to have multiple "layers" of validation so that for example I<span class=""><br>
must do a custom check to make sure some other module record contains<br>
the right value and then use one of the standard validators *as well* on<br></span>
the same field, how would I do this?/<br>
/<span class=""><br>
/<br>
Sorry! I am not clear on this above point. Do you mean you are looking<br>
for how to use existing validator's on your custom field?<br>
</span></blockquote>
<br>
No, not a custom field. It might not even be a custom module.<br>
<br>
We frequently need to apply customer-specifc validation routines.<br>
<br>
For example, suppose I am editing an Account record (example the phone number field) and before I am allowed to save this field I must check that something is valid in a related module (which might be custom or might be a normal one, like an Invoice for example...).<br>
<br>
If my custom validation rule works, then that phone field will still need to run the standard validation in Vtiger_PhoneValidator_Js.<br>
<br>
Does this make sense?<br>
<br>
Alan<br>
<br>
<br>
<br>
<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>