views:

39

answers:

1

Normally all validation methods is connected to a field, radiobuttons, dropdowns etc. In my case I would like to do a general custom validation that depends on many fields in my form.

I dont want one field of them to become highlighted like a normal "required", i would rather just show a message in the errorcontainer.

Is there a simple way to do this I have overlooked?

Update: i want to add a custom validation with jQuery.validator.addMethod(...) but not assign it to a single input, but rather the whole form as my custom validate will do some very special magic that depends on many fields

A: 

if I understand well you have a form and "for example" at the top of the form a summary of all error..

if so.. not so hard ^^ just tell at the target div an id and all goes well

if you don't know where watch this http://jquery.bassistance.de/validate/demo/errorcontainer-demo.html

I tought it was usuful :)

Paper-bat
Thanks, but that was not was i was looking for. I want to add a custom validation, "jQuery.validator.addMethod(...)" but not assign it to a single input field, rather the whole form.
Johan Wikström