Skip to content

agworld/validates_as_email

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 <[email protected]>

About

ActiveRecord e-mail validation for Rails 2.3

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%