Prem Sichanugrist
|
8f97e9d19a
|
Add validators reflection so you can do 'Person.validators' and 'Person.validators_on(:name)'.
Signed-off-by: José Valim <jose.valim@gmail.com>
|
2010-02-21 12:37:46 +01:00 |
|
Mikel Lindsaar
|
a07d0f8786
|
Full update on ActiveModel documentation
|
2010-02-01 10:08:20 +11:00 |
|
jamie
|
0a79eb7889
|
Add validates method as shortcut to setup validators for a given set of 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>
|
2010-01-07 19:23:59 +01:00 |
|
José Valim
|
4796be33a4
|
Add missing tests to Validators.
|
2010-01-03 17:14:50 +01:00 |
|
José Valim
|
279067639f
|
validates_each uses a BlockValidator.
|
2009-12-23 01:38:15 +01:00 |
|
José Valim
|
977a5c43b1
|
Added check_validity! to EachValidator and refactor existing ones.
|
2009-12-23 01:08:27 +01:00 |
|
José Valim
|
f1085f4128
|
Move validations in ActiveModel to validators, however all validatity checks are still in the class method.
|
2009-12-23 00:36:51 +01:00 |
|
José Valim
|
2476c5312d
|
Validator is simply sent to validate method. However, the API needs to change, so validate accepts a record.
|
2009-12-22 23:12:21 +01:00 |
|
José Valim
|
e714b499cc
|
Move validator, human_name and human_attribute_name to ActiveModel, remove deprecated error messages and add i18n_scope and lookup_ancestors.
Signed-off-by: Carl Lerche <carllerche@mac.com>
|
2009-10-20 17:52:32 -07:00 |
|