aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/validations/presence.rb
Commit message (Collapse)AuthorAgeFilesLines
* revises references to :allow_(nil|blank) in some docs [ci skip] [Steven Yang ↵Xavier Noria2014-01-261-1/+1
| | | | | | & Xavier Noria] Closes #11247.
* Revert the change at ActiveModel::Errors#add_on_blank and fix in theRafael Mendonça França2012-12-261-2/+2
| | | | | | | | | | | right place. The EachValidator#validate already handle :allow_blank and :allow_nil, correctly. Closes #8622. Fix #8621.
* minor edits and remove mixed titles in AM::Validations docs [ci skip]Francesco Rodriguez2012-10-251-1/+0
|
* minor edits in AM documentation [ci skip]Francesco Rodriguez2012-10-211-2/+2
|
* load active_support/core_ext/object/blank in active_support/railsXavier Noria2012-08-021-1/+0
|
* AM::Validations: remove documentation duplicatesBogdan Gusiev2012-07-101-14/+4
|
* update ActiveModel::Validations::HelperMethods documentation [ci skip]Francesco Rodriguez2012-07-051-10/+11
|
* add :nodoc: to internal implementations [ci skip]Francesco Rodriguez2012-06-251-2/+2
|
* fixing removed empty lines and examplesFrancesco Rodriguez2012-05-161-0/+1
|
* better format and fixes to validators docsFrancesco Rodriguez2012-05-161-13/+16
|
* Cosmetic fixes in AM validatations docsAlexey Vakhov2011-11-271-3/+3
|
* Implemented strict validation conceptBogdan Gusiev2011-08-171-0/+2
| | | | | | | In order to deliver debug information to dev team instead of display error message to end user Implemented strict validation concept that suppose to define validation that always raise exception when fails
* copy-edits 8d96b89Xavier Noria2011-02-211-1/+3
|
* Clarification of ActiveRecord ActiveModel validation documentationPeer Allan2011-02-181-2/+1
|
* Make ActiveModel::Errors#add_on_blank and #add_on_empty accept an options ↵Jeroen van Dijk2010-06-211-1/+1
| | | | | | | | | | | | | | | | hash and make various Validators pass their (filtered) options. This makes it possible to pass additional options through Validators to message generation. E.g. plugin authors want to add validates_presence_of :foo, :format => "some format". Also, cleanup the :default vs :message options confusion in ActiveModel validation message generation. Also, deprecate ActiveModel::Errors#add_on_blank(attributes, custom_message) in favor of ActiveModel::Errors#add_on_blank(attributes, options). Also, refactoring of ActiveModel and ActiveRecord Validation tests. Test are a lot more DRY now. Better test coverage as well now. The first four points were reapplied from an older patch of Sven Fuchs which didn't apply cleanly anymore and was not complete yet. Signed-off-by: José Valim <jose.valim@gmail.com>
* Add titles to the rest of the files in active_model/validations/*Rizwan Reza2010-06-151-0/+2
|
* Revert "Make ActiveModel::Errors#add_on_blank and #add_on_empty accept an ↵José Valim2010-05-151-1/+1
| | | | | | | | options hash and make various Validators pass their (filtered) options." Having a huge array to whitelist options is not the proper way to handle this case. This means that the ActiveModel::Errors object should know about the options given in *all* validators and break the extensibility added by the validators itself. If the intent is to whitelist options before sending them to I18n, each validator should clean its respective options instead of throwing the responsibility to the Errors object. This reverts commit bc1c8d58ec45593acba614d1d0fecb49adef08ff.
* Make ActiveModel::Errors#add_on_blank and #add_on_empty accept an options ↵Jeroen van Dijk2010-05-151-1/+1
| | | | | | | | | | | | | | | | | | | | hash and make various Validators pass their (filtered) options. This makes it possible to pass additional options through Validators to message generation. E.g. plugin authors want to add validates_presence_of :foo, :format => "some format". Also, cleanup the :default vs :message options confusion in ActiveModel validation message generation. Also, deprecate ActiveModel::Errors#add_on_blank(attributes, custom_message) in favor of ActiveModel::Errors#add_on_blank(attributes, options). Original patch by Sven Fuchs, some minor changes and has been changed to be applicable to master again [#4057 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* validation macros can now be used within an instanceJosh Kalderimis2010-05-131-1/+1
|
* Add validates method as shortcut to setup validators for a given set of ↵jamie2010-01-071-2/+1
| | | | | | | | | | | | | | | 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>
* Move validations in ActiveModel to validators, however all validatity checks ↵José Valim2009-12-231-7/+8
| | | | are still in the class method.
* Changed ActiveRecord to use new callbacks and speed up observers by only ↵José Valim2009-09-081-1/+1
| | | | | | notifying events that are actually being consumed. Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Properly require ActiveModel validation dependenciesJoshua Peek2009-06-081-2/+4
|
* Move validate_on_create and validate_on_update from ActiveModel to ActiveRecordPratik Naik2009-03-211-2/+1
|
* Move all the Active Record validations to Active ModelPratik Naik2009-03-191-17/+15
|
* Improve documentation coverage and markupXavier Noria2008-05-021-11/+15
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Splitting them up firstDavid Heinemeier Hansson2008-04-011-0/+38
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9173 5ecf4fe2-1ee6-0310-87b1-e25e094e27de