Created
March 8, 2018 20:48
-
-
Save MuhammedMahdy/634d2ed9be8bcac94d2572c1a5066d18 to your computer and use it in GitHub Desktop.
jquery validation init
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
<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