Hi all,
I think this is a rather rare situation but it happens in our apps all
the time.
The layout is like
--- Search Result----
<table>
....
<tr> [checkbox] status [input text] [input text] [textarea] </tr>
....
</table>
[Delete button] [Reject Button] [Update Button]
There are different case of validation:
- when press delete button, validate if checkbox is checked only
- when press reject button, validate if checkbox is checked and status
is not rejected
- when press update button, validate that all fields are filled and
format correct.
For the time being, I use some rude way to do so...
var setting1 = {...};
var setting2 = {...};
var setting3 = {...};
$("#delete").click(function(){
var f = $("#form")[0];
$.removeDate(f, 'validator');
f.validate(setting1).submit();
});
//... similar for the reject and update button
Any better way to do this?
Or I should not use validation plugin under this situation?