[Vtigercrm-developers] Javascript Validation

Alan Lord alanslists at gmail.com
Tue Jul 2 11:05:50 UTC 2013


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



More information about the vtigercrm-developers mailing list