[Vtigercrm-developers] extend Validation engine

Alan Lord (News) alanslists at gmail.com
Sat Feb 21 16:11:37 GMT 2015


Thanks for the "cluebat" Uma,

Very helpful answers - I didn't think of just testing for uitype - lol.

Will report back when I test this next week.

Alan

On 21/02/15 14:34, Uma S wrote:
> Hi Alan,
>
> /Suppose I want to apply this validation check to all UI Type 11 (phone
> number) fields for all/any modules... How do I do that?/
> /
> /
> This can be achieved at Field model level, like you already know if for
> all module in Vtiger_Field_Model and if for few module then particular
> module Field_Model level in getValidator api(), by checking uitype of
> field instead of fieldname.
>
> /Secondly, suppose I want to apply a single validation check to *any*
> editable field on a module record only if the record is *not* a new one?/
> /
> /
> If you want apply validation on a record only if it's not new, then we
> need to check on mode of record whether it is edit mode and apply
> validation.
>
> Hope this might add some value for discussion.



-- 
Libertus Solutions
http://www.libertus.co.uk



More information about the vtigercrm-developers mailing list