Total Pageviews

Popular Posts

Monday, October 25, 2010

capslock validation jquery addmethod


use this in jquery.validate.js file and change other places which wanted to change in the file
in
messages:{
uppercase: "Please enter a uppercase.",
}

and
in
classRuleSettings:{

uppercase: {
uppercase: true
},
}

uppercase: function(value,element) {
return this.optional(element) || !/([a-z])/.test(value);
},


and validation scripts
$(document).ready(function() {
$("#form1").validate({
rules: {

txtfirst_name: {
uppercase: true,
required: true
},

}

No comments:

Post a Comment