stephencelis / good_form forked from cementhorses/good_form
- Source
- Commits
- Network (1)
- Issues (0)
- Downloads (2)
- Wiki (1)
- Graphs
-
Branch:
master
tom g (author)
Mon Jan 26 07:39:14 -0800 2009
| name | age | message | |
|---|---|---|---|
| |
CHANGELOG.rdoc | ||
| |
MIT-LICENSE | ||
| |
README.rdoc | ||
| |
good_form.js | ||
| |
test/ |
README.rdoc
GoodForm
github.com/cementhorses/good_form
A JavaScript version of Active Record’s validation suite.
Features
- Library-agnostic!
- Unit-tested!
- Ajax and client-side validations.
Example
Ready!
<script src="good_form.js" type="text/javascript"></script>
Set!
Validates.Presence("login", "email", "password", "password_confirmation");
Validates.Length("login", "email", { maximum: 32, allowBlank: true });
Validates.Format("email", { withOption: /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i, allowBlank: true });
Validates.Confirmation("password", { allowBlank: true });
Go!
Validate.All();
Slow…
Validate("login");
See the inline documentation for way more info.
TODO
- Make sure everything is A-OK across the browser board (tested in WebKit).
- How about some granularity? Some callbacks?
Copyright © 2008-* Stephen Celis. Released by Cement Horses under the MIT License.

