title: Selective JQuery validation
body: <p>I'm using <a href="http://docs.jquery.com/Plugins/Validation" rel="nofollow noreferrer">JQuery Validation</a> to validate a particular textbox in my form. The textbox is an optional <code>website</code> section, which uses the <code>url</code> validation method. This works fine and validates accordingly. I would like to have <code>http://</code> preset into the textbox, to save the user having to type it. However, when the text is set, the validator becomes 'active', and prevents anything on the form being submitted until either the <code>http://</code> is manually removed, or a valid website is entered. Is there a way of preseting text into the textbox, which won't cause the validator to start validating?</p>
  
  <p>I tried to use</p>
  
  <pre><code>$("[id$='tbWebsite']").val("http://");
  </code></pre>
  
  <p>just before I call <code>form.validate()</code>, but it doesn't work (i.e. it still gets checked).</p>
  
  <p>I've never used JQuery Validator before, so hopefully there's a fix for this that I'm missing!</p>
  
  <p>An alternate solution for my case in particular, could be to activate the validator if a certain button is pressed (instead of any button on the form). Would that be possible?</p>
  
  <p>Thanks</p>
  
  <p><strong>Update</strong></p>
  
  <p>I've added this to the textbox declaration:</p>
  
  <pre><code>onfocus="if(this.value == 'http://' || this.value == '')this.value='http://'" onblur="if(this.value == 'http://')this.value=''" 
  </code></pre>
  
  <p>That solves the main problem. However, if the user clicks in the textbox, then clicks away, the error message is still displayed (even though it's not enforced, and the form can be submitted). What would be the best way to ensure that the error message isn't displayed at all, if the value is 'http://'?</p>