Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to exempt element to be validated?
    text
    copied!<p>I'm using the validation plugin for jquery: <a href="http://docs.jquery.com/Plugins/Validation" rel="nofollow noreferrer">http://docs.jquery.com/Plugins/Validation</a>.</p> <p>I want to know how would I exempt a field to be validated? Currently all fields inside the form are automatically checked.</p> <hr> <p>I am not sure if this will help since the element that I want to exempt is not included (obviously :) )</p> <pre><code> $("#contactForm").validate({ rules: { first_name:{required: true,charsonly:true,minlength: 1 }, last_name:{required:true,charsonly:true,minlength: 1 }, birthday:{required:true,min:1,max:31 }, birthmonth:"required", birthyear:"required", username: {required: true,minlength:1,maxlength:32,username:true,notChinese:true,noSpecial:true}, password1:{required:true,minlength: 5,maxlength: 10, alphaNum: true }, password2:{required:true,minlength: 5,maxlength: 10, alphaNum: true, equalTo: "#password1"}, currency:"required", address:{required: true,noSpecial:true,minlength:2}, city:{required: true,noSpecial:true,minlength:2}, state:{noSpecial:true}, countrycode:"required", zip:{required:true,zipTest:true}, email:{required:true,email: true}, confirmemail:{required: true,equalTo: "#email",email:true}, phone:{required: true,minlength:6,maxlength:20,phoneUS:true}, cellphone:{required: true,minlength:6,maxlength:20,phoneUS:true}, custom06:{acceptIM:true} } }); </code></pre> <hr> <p>Found it. I used the ignore validation method.</p> <hr> <p>Here's the code</p> <pre><code>$("#myform").validate({ ignore: ".ignore" }) </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload