0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
A collection of misc usefull validators for ActiveRecord::Base (email, URL)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

MiscValidators¶ ↑

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

Examples¶ ↑

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

Installation¶ ↑

As a gem from Gemcutter :

sudo gem install misc_validators

As a plugin :

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

Tests¶ ↑

If you wanna run the tests :

rake spec

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