• Check form validation using jQuery

    Please find below code for check form validation using jQuery here.

    1
    2
    3
    
    &lt;!doctype html&gt;<meta charset="utf-8" />
     
    						<link href="http://jquery.bassistance.de/validate/demo/site-demos.css" rel="stylesheet" />

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script><script type="text/javascript" src="http://jquery.bassistance.de/validate/jquery.validate.js"></script><script type="text/javascript" src="http://jquery.bassistance.de/validate/additional-methods.js"></script><script type="text/javascript">// <![CDATA[
    // just for the demos, avoids form submit
     
    jQuery.validator.setDefaults({
      debug: true,
      success: "valid"
     
    });
    var form = $( "#myform" );
     
    form.validate();
    $( "button" ).click(function() {
      alert( "Valid: " + form.valid() );
     
    });
    // ]]></script>

Comments on this post

Leave a Reply

  • Security Code :


    9 − = zero