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
|
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 |
|
Pratik Naik
|
e202c6c814
|
Move :with/:without check outside the method generated by validates_format_of
|
2009-08-10 15:24:48 +01:00 |
|
Elliot Winkler
|
cccb0e6b93
|
Add validates_format_of :without => /regexp/ option [Elliot Winkler, Peer Allan]
[#430 state:resolved]
Example :
validates_format_of :subdomain, :without => /www|admin|mail/
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
|
2009-08-10 15:22:31 +01:00 |
|
Joshua Peek
|
28f36279cd
|
Properly require ActiveModel validation dependencies
|
2009-06-08 20:32:08 -05:00 |
|
Pratik Naik
|
e4b89b4680
|
Validation options dont need explicit :on => :save
|
2009-03-21 01:16:30 +00:00 |
|
Pratik Naik
|
8828b2ca67
|
Move all the Active Record validations to Active Model
|
2009-03-19 23:28:59 +00:00 |
|
Xavier Noria
|
64092de257
|
Improve documentation coverage and markup
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
|
2008-05-02 14:45:23 +01:00 |
|
David Heinemeier Hansson
|
87535bd373
|
Splitting them up first
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9173 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2008-04-01 00:05:48 +00:00 |
|