Restrict validation to one field?

1 message Options
Embed this post
Permalink
Todd

Restrict validation to one field?

Reply Threaded More More options
Print post
Permalink
I've been reading the book, and attempted to get help through #irc, but haven't had much luck to find a good solution to this problem, maybe you wanted to share it with your readers.

Is there a way to restrict validation to a single field?
Basically, reuse the same validation rules you already have, but don't validate the other fields yet.

Like a $validateField function.

In multi page forms, you don't want to save, or do anything to the data in the first few pages, sometimes you just want to ask them for the email address and confirmation and validate that it is unique, valid syntax, and that the two emails match.

When you run the normal validates function, it succeeds in throwing out the errors, but when that the field is correct, it then goes on to fail with another of the fields that are being validated - but those fields are not in the form yet - they come much later.


I hope you get a chance to look at this.

Thank you.