title: How do you validate optional fields with default value?
body: <p>I made some changes to the following example:</p>
  
  <p><a href="http://docs.jquery.com/Plugins/validation#Example" rel="nofollow">http://docs.jquery.com/Plugins/validation#Example</a></p>
  
  <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
                      "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;script src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/validate/jquery.validate.js"&gt;&lt;/script&gt;
  &lt;style type="text/css"&gt;
  * { font-family: Verdana; font-size: 96%; }
  label { width: 10em; float: left; }
  label.error { float: none; color: red; padding-left: .5em; vertical-align: top; }
  p { clear: both; }
  &lt;/style&gt;
    &lt;script&gt;
    $(document).ready(function(){
      $("#commentForm").validate();
    });
    &lt;/script&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
  
  
   &lt;form class="cmxform" id="commentForm" method="get" action=""&gt;
   &lt;fieldset&gt;
     &lt;legend&gt;A simple comment form with submit validation and default messages&lt;/legend&gt;
     &lt;p&gt;
       &lt;input id="cname" name="name" size="25" class="required" value="Name" onfocus="if (this.value == 'Name') {this.value=''}" onblur="if(this.value == '') { this.value='Name'}" /&gt;
     &lt;/p&gt;
     &lt;p&gt;
       &lt;input id="cemail" name="email" size="25"  class="required email" value="Email" onfocus="if (this.value == 'Email') {this.value=''}" onblur="if(this.value == '') { this.value='Email'}" /&gt;
     &lt;/p&gt;
     &lt;p&gt;
       &lt;input id="curl" name="url" size="25"  class="url" value="URL" onfocus="if (this.value == 'URL') {this.value=''}" onblur="if(this.value == '') { this.value='URL'}" /&gt;
     &lt;/p&gt;
     &lt;p&gt;
       &lt;textarea id="ccomment" name="comment" cols="35" rows="5" class="required" onfocus="if (this.value == 'Comment') {this.value=''}" onblur="if(this.value == '') { this.value='Comment'}"&gt;Comment&lt;/textarea&gt;
     &lt;/p&gt;
     &lt;p&gt;
       &lt;input class="submit" type="submit" value="Submit"/&gt;
     &lt;/p&gt;
   &lt;/fieldset&gt;
   &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I know how to add custom validation methods for the required fields Name, Email, and Comment. But I just don't know how to validate the optional filed URL. I've searched everywhere to no avail!</p>
  
  <p>Any help is greatly appreciated!</p>
  
  <p>Desparate</p>