Skip to content
This repository was archived by the owner on Jun 17, 2020. It is now read-only.

Files

Latest commit

 

History

History
33 lines (20 loc) · 617 Bytes

README.rdoc

File metadata and controls

33 lines (20 loc) · 617 Bytes

ExtraValidators

A compilation of simple validators we need in most Rails apps. This gem plugin only works with Rails 3 / ActiveModel.

Examples

Validation of an email address :

class MyModel < ActiveRecord::Base
  validates :my_email_field, :email => true
end

Validation of an URL :

class MyModel < ActiveRecord::Base
  validates :my_url_field, :url => true
end

Installation

As a gem in your app’s Gemfile :

gem 'extra_validators'

Tests

If you wanna run the tests :

rake spec

Copyright © 2010 Aurélien Malisart, released under the MIT license, see LICENSE for more details.