Sha256: e86345b0db18a155145c9a60a3d84c10df23829cc45e954378023e2fa821e508
Contents?: true
Size: 876 Bytes
Versions: 1
Compression:
Stored size: 876 Bytes
Contents
h1. email_validation -- Simple email validator for Rails 3 | *Author* | Tim Morgan | | *Version* | 1.1 (Mar 23, 2011) | | *License* | Released under the MIT license. | h2. About This gem adds a very simple email address format validator to be used with ActiveRecord models in Rails 3.0. It supports localized error messages. h2. Installation Add the gem to your project's @Gemfile@: <pre><code> gem 'email_validation' </code></pre> h2. Usage This gem is an @EachValidator@, and thus is used with the @validates@ method: <pre><code> class User < ActiveRecord::Base validates :email_address, presence: true, email: true end </code></pre> The localization key is @invalid_email@, and can be specified in the localized YAML file like so: <pre><code> en: activerecord: errors: messages: invalid_email: Email address is invalid. </code></pre>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
email_validation-1.1.0 | README.textile |