[validate] Validate based on other fields

Hi all,

I'm just getting to grips with this Validation plug-in but would like
to check whether something is possible.
I would like to run validation on a field based on values from other
parts of the form.

I realise that this is possible with the required field, i.e.

required: function(element) { return jQuery("#textarea1").val ==
'buga' && jQuery("#textarea2").val != 'booga' }

But this is also possible for the other functions? i.e. the same as
above but for maxLength?

maxLength: function(element) { return jQuery("#textarea1").val ==
'buga' && jQuery("#textarea2").val != 'booga' }


The reason I ask is that I would like to apply validation but not
necessarily have the form field as mandatory.


Many thanks,


Steve

Reply via email to