Created
May 14, 2013 13:17
-
-
Save wonderbeyond/0ad86577e90cdd522761 to your computer and use it in GitHub Desktop.
jquery.validation usage
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
$(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