Sha256: ba4a58828c2b61bc8ae1bdbec0f7c7b60fc01ea5c9402e519893648e84cf19ad

Contents?: true

Size: 1.11 KB

Versions: 1

Compression:

Stored size: 1.11 KB

Contents

h1. validates_im -- Instant messenger account validations for ActiveRecord

| *Author* | Tim Morgan |
| *Version* | 1.1 (Aug 31, 2011) |
| *License* | Released under the MIT license. |

h2. About

@validates_im@ is a simple gem that gives you some @EachValidators@ that you can
use to validate instant messenger account names in your Rails 3.0 application.
Validators are provided for the most common IM services, like AIM, Yahoo! IM,
and Skype.

h2. Installation

*Important Note:* This gem is for Rails 3 only.

To install, simply add this gem to your Rails project's @Gemfile@:

<pre><code>
gem 'validates_im'
</code></pre>

h2. Usage

The IM validators are @EachValidators@, meant to be used with the @validates@
method. An example:

<pre><code>
validates :screen_name,
          aim: true,
          presence: true
</code></pre>

The name of the symbol key is taken from the name of the validator; as such, The
@XboxLiveValidator@ would be invoked using @:xbox_live@. See the
{AccountNameValidator} class docs for more information.

The localization keys for validation errors are listed in the documentation for
each validator class.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
validates_im-1.1.0 README.textile