This project is archived and is in readonly mode.
Changeset [7045c4c279499eb7340fb420398d613497739eef] by José Valim
Revision 7045c4c279499eb7340fb420398d613497739eef,
committed by José Valim
· January 8th, 2010 @ 08:36 PM
Allow validates to map some types to specific options. So now you can do:
validates :email, :presence => true, :format => /@/ validates :genre, :inclusion => %w(m f) validates :password, :length => 6..20 http://github.com/rails/rails/commit/7045c4c279499eb7340fb420398d61...
4 changed files
-
M
activemodel/lib/active_model/validations/numericality.rb -
M
activemodel/lib/active_model/validations/validates.rb -
M
activemodel/test/cases/validations/validates_test.rb -
M
activemodel/test/models/person.rb