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

Latest commit

 

History

History
executable file
·
39 lines (23 loc) · 776 Bytes

File metadata and controls

executable file
·
39 lines (23 loc) · 776 Bytes

A compilation of simple validators we need in most rails apps (AR based).

Note : This gem is Rails 2.x compatible only. If you’re looking for the same functionnality for Rails 3, take a look at my : github.com/aurels/extra_validators

Validation of an email address :

class MyModel < ActiveRecord::Base
  validates_email :my_email_field
end

Validation of an URL :

class MyModel < ActiveRecord::Base
  validates_url :my_url_field
end

As a gem from Gemcutter :

sudo gem install misc_validators

As a plugin :

script/plugin install git://github.com/aurels/misc_validators.git

If you wanna run the tests :

rake spec

Copyright © 2009 Aurélien Malisart, released under the MIT license