How to keep jQuery Validation plugin from adding 'error' class to input box -


i have jquery validation plugin:

//name validation   cnform.validate({     rules: {         customername:                  {                required: true,                      minlength: 3         },         date:             {             required: true,             dateregex: /^(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.](19|20)\d\d$/,             maxlength: 10             }                        },         onkeyup: false,         onclick: false,         onfocusout: false,         messages: {             customername: {             required: "unable proceed, search field empty"                       },                   date: {             required: "unable proceed, search field empty"                 }            },         errorplacement: function(error, element) {                     var trigger = element.next('.ui-datepicker-trigger');                     error.insertafter(trigger.length > 0 ? trigger : element);             }   }); 

whenever input data causes error, appropriate new label display after input box/button, class error applied input box. there way avoid assigning class box? thanks.

you can use highlight call override default behavior.

$(".selector").validate({     highlight: function(element, errorclass) {         // override default behavior here     } }); 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -