Skip to content

Instantly share code, notes, and snippets.

@srttk
Created June 29, 2013 08:49
Show Gist options
  • Save srttk/5890420 to your computer and use it in GitHub Desktop.
Save srttk/5890420 to your computer and use it in GitHub Desktop.
//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