jquery validation form doesnt work -
i have registration form field requirements in form written in php , i'm trying add validation plugin it, plugin doesn't work, i'm not getting errors.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"> </script> <script src="scripts/jquery.validate.js"></script> <script> $(function(){ $("#regform").validate({ rules: { brukernavn: { required: true, minlength:3, maxlength:10 }, passord: { required: true, minlength:3, maxlength:10 }, bekreft_pass: { required: true, minlength:3, maxlength:10 }, e_post: { required: true, email: true }, bekreft_epost { required: true, email: true }, messages: { } } }); $.extend($.validator.messages, { required: "obligatorisk felt:" }); }); </script> <form id="regform" method="post" action=""> <label for="brukernavn">brukernavn</label><br> <input type='text' id="brukernavn" name="brukernavn"><br> <label for="passord">passord</label> <input type="password" id="passord" name="passord"><br> <label for="bekreft_pass">bekreft passord</label> <input type="password" id="bekreft_pass" name="passord2"><br> <label for="e_post">e-post</label> <input type="e-post" id="e_post" name="e-post"><br> <label for="bekreft_epost">bekreft e-post</label> <input type="e-post" id="bekreft_epost" name="e-post2"><br> <br> <input type='submit' id"submit" value='register'>
does see problem is?
there missing colon character here: bekreft_epost {
should bekreft_epost: {
also, there no closing form tag.
Comments
Post a Comment