<div dir="ltr">Hi Alan,<div><br></div><div>Our team is using a solution very similar to the one you describe.</div><div><br></div><div>Check the attached module.</div><div><br></div><div>It should be easy to understand how it works just by reading the code.</div>

<div><br></div><div>You may have to modify the code to make it compatible to the standard save buttons of vtiger's modules.</div><div><br></div><div>Feel free to come back here if you have any question.</div><div><br>

</div><div>Enjoy !</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/7/2 Alan Lord <span dir="ltr"><<a href="mailto:alanslists@gmail.com" target="_blank">alanslists@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Anyone got any examples/thoughts for implementing custom validation rules?<br>
<br>
I've got a bunch of custom (vtlib) modules and I need to do do some rather specific field validations prior to saving; a few of which will need to check related data from other modules.<br>
<br>
I'd like to limit the amount of core hacking to a minimum so am thinking I can probably "override" the formValidate()/<u></u>doformValidation() function in general.js in my own js file simply by loading my file after general.js probably via a HEADERSCRIPT action link in each of the modules where I need the validations.<br>


<br>
Would you do it this way?<br>
<br>
Or would you write module specific validations in each modules/Module.js file? (But I'll also need to do some validations on fields I've added to standard vtiger modules).<br>
<br>
Or is there another method I haven't considered?<br>
<br>
Cheers<br>
<br>
Al<br>
<br>
______________________________<u></u>_________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br>
</blockquote></div><br></div>