Skip to content

Instantly share code, notes, and snippets.

@wonderbeyond
Created May 14, 2013 13:17
Show Gist options
  • Save wonderbeyond/0ad86577e90cdd522761 to your computer and use it in GitHub Desktop.
Save wonderbeyond/0ad86577e90cdd522761 to your computer and use it in GitHub Desktop.
jquery.validation usage
$(document).ready(function(){
$('#change_email_form').validate({
rules: {
email1: {required:true, email:true},
email2: {required:true, email:true, equalto:"#id_email1"},
},
messages: {
email2: {
equalto: '两次输入邮箱地址不一致'
}
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment