aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/validations/validates.rb
Commit message (Collapse)AuthorAgeFilesLines
* Validates needs hash slice.José Valim2010-01-171-0/+2
|
* Fix typos and add tests to ensure they will be caught the next time.José Valim2010-01-111-1/+1
|
* Fix typo by renaming :genre to :gender.José Valim2010-01-091-1/+1
|
* Allow validates to map some types to specific options. So now you can do:José Valim2010-01-081-12/+32
| | | | | | 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-6/+18
| | | | validates.
* Add validates method as shortcut to setup validators for a given set of ↵jamie2010-01-071-0/+74
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>