Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MuhammedMahdy/634d2ed9be8bcac94d2572c1a5066d18 to your computer and use it in GitHub Desktop.
Save MuhammedMahdy/634d2ed9be8bcac94d2572c1a5066d18 to your computer and use it in GitHub Desktop.
jquery validation init
<script type="text/javascript">
$(function(){
$('.signUp').validate({
onfocusout: function (element) {
validateWrap($(element).valid(),element);
},
rules:{
username:{required:true, email: true},
password:{required:true}
},
messages:{
all:{ required: 'This field is required'}
}
});
})
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment