Apr 22, 2010 at 4:14 PM
Edited Apr 22, 2010 at 4:17 PM
I have two scenarios which i think will probably be solved in different ways. I've had a google/look on here, but not found anything that solves the problems
1) I have a page with 3 buttons, each button submits to a different action (Think of each button submitting a change for its group). The page uses one model and form.
If i click on button A, the validation is kicked in for button B and C's textboxes, which i dont want to happen.
2) I have a page that displays several textboxes dependent on what the user clicks (Radio buttons). So if they click section B, a few more textboxes are displayed. This page is setup in the same way as the first (One model and form), but
uses an ajax call instead of a normal http post.
The problem is, i only want to validate the textboxes which are visible, thus if the user clicks section A, section B and C's textboxes should not be validated.
PS. I am using jQuery Validation, and i know this question is to do more with jQuery then xVal since i want the behavior to be client side.