I have implemented validation using jquery validate plugin and trying to apply in the following ways
first added $.validator.addMethod("character" ........);
and executing in below ways
1. Will apply Rules for that particular field
rules :{
someName: {
character: true,
required: true,
},
}
2. Will apply at class level
// connect it to a css class
$.validator.addClassRules({
character: { character: true }
});
What am looking for is is there a way i can make this validation code for all input Textboxes in a small line rather than adding class for all textboxes !
What will be the best way to implement?
As i want this validation at application level am looking for some easy approach rather touching every where!
Thanks