MiscValidators
A compilation of simple validators we need in most rails apps (AR based).
Examples
Validation of an email address:
class MyModel < ActiveRecord::Base
validates_email :my_email_field
end
Validation of an URL:
class MyModel < ActiveRecord::Base
validates_url :my_url_field
end
Installation
As a gem:
sudo sources -a http://gems.github.com
sudo gem install aurels-misc_validators
As a plugin in your app:
script/plugin install git://github.com/aurels/misc_validators.git
Copyright © 2009 Aurélien Malisart, released under the MIT license