title: how to validate alphanumeric numeric and higlight the fields using jquery
body: <p>I am looking for validation using jquery on a simple form and I want to know how I can check for alphanumeric or numeric.  Then I want to highlight the error text field using rules.  This code is working great is entered in the fields can anyone help on adding this functionality to my code?</p>
  
  <p>here is the code i have used</p>
  
  <pre><code>$("#frmstudent").validate({
        rules:{
            txt_name :{ required:true, minlength : 3 },  
  
            txt_fname:{ required:true, minlength : 3  },
  
            txt_class:{ required:true, minlength: 2 },
  
            txt_city:{ required:true, minlength : 3},
  
            txt_contact:{ required:true, minlength : 5 },
  
            txt_email:{ required:true, email:true, minlength : 8},
  
            txt_address:{ required:true , minlength : 10}
  
        },
        messages:{
  
            txt_name:{required:"&lt;i&gt;Please enter ur full name&lt;/i&gt;",
                      minlength:"&lt;i&gt;please enter at least 3 characters&lt;/i&gt;"},
  
            txt_fname:{required:"&lt;i&gt;Please enter the fathers name in required field&lt;/i&gt;",
                      minlength:"&lt;i&gt;please enter at least 3 characters&lt;/i&gt;"},
  
            txt_class:{required:"&lt;i&gt;Please enter the your class name&lt;/i&gt;",
                      minlength:"&lt;i&gt;please enter at least 2 characters&lt;/i&gt;"},
  
            txt_city:{required:"&lt;i&gt;Please enter your city name&lt;/i&gt;",
                      minlength:"&lt;i&gt;please enter at least 3 characters&lt;/i&gt;"},
  
            txt_contact:{required:"&lt;i&gt;Please enter your contact details&lt;/i&gt;",
                      minlength:"&lt;i&gt;please enter at least 5 characters&lt;/i&gt;"},
  
            txt_email:{required:"&lt;i&gt;Please enter your valid email address&lt;/i&gt;",
                      minlength:"&lt;i&gt;please enter at least 8 characters&lt;/i&gt;"},
  
            txt_address:{required:"&lt;i&gt;Please enter your address&lt;/i&gt;",
                      minlength:"&lt;i&gt;please enter at least 10 characters&lt;/i&gt;"}
  
  
        }
      });
  </code></pre>