aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/cases/validations/validates_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo by renaming :genre to :gender.José Valim2010-01-091-6/+6
|
* Allow validates to map some types to specific options. So now you can do:José Valim2010-01-081-11/+37
| | | | | | validates :email, :presence => true, :format => /@/ validates :genre, :inclusion => %w(m f) validates :password, :length => 6..20
* Allow :if, :unless, :on, :allow_nil and :allow_blank as shared options in ↵José Valim2010-01-071-3/+38
| | | | validates.
* Add validates method as shortcut to setup validators for a given set of ↵jamie2010-01-071-0/+53
attributes: class Person < ActiveRecord::Base include MyValidators validates :name, :presence => true, :uniqueness => true, :length => { :maximum => 100 } validates :email, :presence => true, :email => true end [#3058 status:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>