Skip to content
ActiveRecord e-mail validation for Rails 2.3
Ruby
Find file
Pull request Compare This branch is 11 commits ahead, 3 commits behind xHire:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
config/locales
lib
test
CHANGELOG
LICENSE
README.textile
Rakefile
init.rb

README.textile

ValidatesAsEmail

This work is based on http://github.com/gbdev/validates_as_email.

This Ruby on Rails plugin implements an ActiveRecord validation helper called validates_as_email. The helper acts as if validates_format_of was used with a regular expression used on auto_link helper.

The plugin implements the regular expression here.

Installation

$ ruby script/plugin install http://github.com/sobrinho/validates_as_email.git

Usage

In your model file do something like:

class Person < ActiveRecord::Base
  validates_as_email :email
end

Tests

$ cd vendor/plugins/validates_as_email
$ rake test

License

See the LICENSE file.

Copyright

Copyright © 2010 Gabriel Sobrinho <gabriel.sobrinho@gmail.com>

Something went wrong with that request. Please try again.