[Vtigercrm-developers] Javascript Validation

David V. davidv.net at gmail.com
Fri Jul 5 11:32:15 UTC 2013


Hi Alan,

Our team is using a solution very similar to the one you describe.

Check the attached module.

It should be easy to understand how it works just by reading the code.

You may have to modify the code to make it compatible to the standard save
buttons of vtiger's modules.

Feel free to come back here if you have any question.

Enjoy !


2013/7/2 Alan Lord <alanslists at gmail.com>

> Anyone got any examples/thoughts for implementing custom validation rules?
>
> 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.
>
> I'd like to limit the amount of core hacking to a minimum so am thinking I
> can probably "override" the formValidate()/**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.
>
> Would you do it this way?
>
> 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).
>
> Or is there another method I haven't considered?
>
> Cheers
>
> Al
>
> ______________________________**_________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20130705/731f6f1b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: JSValidation.zip
Type: application/zip
Size: 3610 bytes
Desc: not available
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20130705/731f6f1b/attachment.zip>


More information about the vtigercrm-developers mailing list