Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

ActiveRecord e-mail validation for Rails 2.3

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

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.