I have used http://bassistance.de/jquery-plugins/jquery-plugin-validation/
my form validate :
$(\"#form_person\").validate({
rules: {
u
I used the answer of @Reigel but it didn't work for me.
I have change his example like this :
$(document).ready(function(){
jQuery.validator.addMethod("noSpace", function(value, element) {
return value == '' || value.trim().length != 0;
}, "No space please and don't leave it empty");
$("form").validate({
rules: {
name: {
noSpace: true
}
}
});
})
In my opinion noSpace isn't responsible to verify empty TextBox(Input). It is responsible to check value if some things was entered.
And it will be a good idea if you use jQuery.validator.addMethod... in other JS file and add this JS file to your master page or some things like that.