135
rated 0 times
[
138]
[
3]
/ answers: 1 / hits: 94622
/ 10 Years ago, tue, april 1, 2014, 12:00:00
My validation accepts only alphabets. I want allow spaces as well.
$.validator.addMethod("alpha", function(value, element) {
return this.optional(element) || value == value.match(/^[a-zA-Z]+$/);
});
What change needs to be done here?
More From » jquery