Created
August 16, 2010 01:37
-
-
Save matthewford/526231 to your computer and use it in GitHub Desktop.
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
<!-- include jQuery and jCheck and default styles --> | |
<link rel="stylesheet" type="text/css" href="/stylesheets/jcheck.css" /> | |
<script type="text/javascript" src="/javascripts/jquery-1.4.2.min.js"></script> | |
<script type="text/javascript" src="/javascripts/jcheck-0.7.1.min.js"></script> | |
<!-- Define Form Validation --> | |
<script type="text/javascript"> | |
var f = $("#user_new").jcheck({field_prefix: "user"}); | |
f.validates_format_of("email", {"with": "email"}); | |
f.validates_confirmation_of("password"); | |
</script> | |
<!-- New User Form (simplified) --> | |
<form action="/users" id="user_new" method="post"> | |
<label for="user_email">Email</label> | |
<input id="user_email" name="user[email]" size="50" type="email" value="" /><br> | |
<label for="user_password">Password</label> | |
<input id="user_password" name="user[password]" size="30" type="password" /><br> | |
<label for="user_password_confirmation">Password confirmation</label> | |
<input id="user_password_confirmation" name="user[password_confirmation]" size="30" type="password" /><br> | |
<input id="user_submit" name="commit" type="submit" value="Sign up" /> | |
</form> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment