Created
June 29, 2013 08:49
-
-
Save srttk/5890420 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//http://jqueryvalidation.org/ | |
<script type="text/javascript" src="js/jquery.validate.min.js"> | |
</script> | |
<script type="text/javascript"> | |
$(document).ready(function() | |
{ | |
//form validation rules | |
// alert('Hello'); | |
$("#careersForm").validate({ | |
rules: { | |
name:"required", | |
email: { | |
required: true, | |
email: true | |
}, | |
phone:{required:true,minlength: 8}, | |
position:{required:true}, | |
upfile:{required:true}, | |
captcha:{required:true} | |
}, | |
messages: { | |
name: "Please enter your name", | |
email: "Please enter a valid email address", | |
phone: "Please enter valid phone number", | |
position:"Please enter position", | |
upfile:"Please select your CV file." | |
}, | |
submitHandler: function(form) { | |
form.submit(); | |
} | |
}); | |
} | |
); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment