Created
December 17, 2013 20:54
-
-
Save jawinn/8012446 to your computer and use it in GitHub Desktop.
CodeIgniter - check username exists, JS validation plugin
This file contains hidden or 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
| rules: { | |
| email1: { | |
| required: true, | |
| email: true, | |
| remote: { | |
| url: "/registration/register_email_exists", | |
| type: "post", | |
| data: { | |
| email: function(){ return $("#email").val(); } | |
| } | |
| } | |
| }, | |
| email2: { equalTo: "#email" } | |
| }, | |
| messages: { | |
| email1: { | |
| required: 'Email address is required', | |
| email: 'Please enter a valid email address', | |
| remote: 'Email already used. Log in to your existing account.' | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment