Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Length validation handles correctly nil. Fix #7180 | Michal Zima | 2012-11-26 | 1 | -2/+14 |
| | | | | When nil or empty string are not allowed, they are not valid. | ||||
* | minor edits in AM documentation [ci skip] | Francesco Rodriguez | 2012-10-21 | 1 | -3/+3 |
| | |||||
* | calculate errors_options one time in validate_each | Angelo Capilleri | 2012-08-03 | 1 | -2/+2 |
| | | | | | | errors_options is calculated for every *CHECKS* but it could be calculated one time because options and RESERVED_OPTIONS not change during this cycle | ||||
* | AM::Validations: remove documentation duplicates | Bogdan Gusiev | 2012-07-10 | 1 | -14/+4 |
| | |||||
* | fix syntax of AM::Validations::HelperMethods examples [ci skip] | Francesco Rodriguez | 2012-07-05 | 1 | -3/+3 |
| | |||||
* | update ActiveModel::Validations::HelperMethods documentation [ci skip] | Francesco Rodriguez | 2012-07-05 | 1 | -24/+26 |
| | |||||
* | add :nodoc: to internal implementations [ci skip] | Francesco Rodriguez | 2012-06-25 | 1 | -1/+1 |
| | |||||
* | fixing removed empty lines and examples | Francesco Rodriguez | 2012-05-16 | 1 | -0/+1 |
| | |||||
* | better format and fixes to validators docs | Francesco Rodriguez | 2012-05-16 | 1 | -17/+27 |
| | |||||
* | Prefer || over 'or' for boolean operations | Benjamin Quorning | 2012-02-22 | 1 | -1/+1 |
| | |||||
* | remove unnecessary require core_ext/string/encoding | Sergey Nartimov | 2012-02-14 | 1 | -2/+0 |
| | |||||
* | To infinity… and beyond! | Niels Ganser | 2012-02-06 | 1 | -2/+2 |
| | | | | | | | Allow infinite values for validates_length_of. Particularly useful for prettily defining an open ended range such as validates_length_of :human_stupidity, :within => 0..Float::INFINITY | ||||
* | don't call an extra method if options[:tokenizer] is not present | Vasiliy Ermolovich | 2011-12-24 | 1 | -4/+2 |
| | |||||
* | use Range#min and Range#max to reduce extra statement | Vasiliy Ermolovich | 2011-12-24 | 1 | -2/+1 |
| | |||||
* | deprecate String#encoding_aware? and remove its usage | Sergey Nartimov | 2011-12-24 | 1 | -2/+0 |
| | |||||
* | Ensure length validator also works on 1.8.7. | José Valim | 2011-12-06 | 1 | -6/+17 |
| | |||||
* | Don't tokenize string when counting characters | Ian Young | 2011-12-04 | 1 | -2/+1 |
| | |||||
* | Fix argument error message for length validation | Alexey Vakhov | 2011-12-01 | 1 | -1/+1 |
| | |||||
* | Implemented strict validation concept | Bogdan Gusiev | 2011-08-17 | 1 | -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 | ||||
* | remove stray ( | Vijay Dev | 2011-06-03 | 1 | -1/+1 |
| | |||||
* | Change hashrocket spacing to match conventions. | Ben Orenstein | 2011-06-02 | 1 | -2/+2 |
| | |||||
* | Remove extra white spaces on ActiveModel docs. | Sebastian Martinez | 2011-05-23 | 1 | -3/+3 |
| | |||||
* | Don't add DEFAULT_TOKENIZER to every instance of LengthValidator. Just use ↵ | Akira Matsuda | 2011-05-16 | 1 | -2/+2 |
| | | | | it only when needed. | ||||
* | Refactor length validation | Santiago Pastorino | 2011-03-12 | 1 | -3/+3 |
| | |||||
* | length validation for fixnums | Andriy Tyurnikov | 2011-03-12 | 1 | -1/+2 |
| | | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | copy-edits 8d96b89 | Xavier Noria | 2011-02-21 | 1 | -1/+3 |
| | |||||
* | Clarification of ActiveRecord ActiveModel validation documentation | Peer Allan | 2011-02-18 | 1 | -1/+1 |
| | |||||
* | Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵ | Santiago Pastorino | 2010-08-14 | 1 | -1/+1 |
| | | | | 's/[ \t]*$//' -i {} \;) | ||||
* | tidy up validations length code [#5297 state:resolved] | Subba Rao Pasupuleti | 2010-08-12 | 1 | -6/+2 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | validates_length_of should not change the options hash in place. [#5283 ↵ | José Valim | 2010-08-03 | 1 | -4/+7 |
| | | | | state:resolved] | ||||
* | Refactor previous commit a bit [#4057 state:resolved] | José Valim | 2010-06-21 | 1 | -2/+2 |
| | |||||
* | Make ActiveModel::Errors#add_on_blank and #add_on_empty accept an options ↵ | Jeroen van Dijk | 2010-06-21 | 1 | -2/+6 |
| | | | | | | | | | | | | | | | | 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 Reza | 2010-06-15 | 1 | -0/+2 |
| | |||||
* | Revert "Make ActiveModel::Errors#add_on_blank and #add_on_empty accept an ↵ | José Valim | 2010-05-15 | 1 | -2/+2 |
| | | | | | | | | 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 Dijk | 2010-05-15 | 1 | -2/+2 |
| | | | | | | | | | | | | | | | | | | | | 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 instance | Josh Kalderimis | 2010-05-13 | 1 | -1/+1 |
| | |||||
* | Favor %{} in all code instead of (deprecated) {{}} as interpolation syntax ↵ | Lawrence Pit | 2010-05-03 | 1 | -3/+3 |
| | | | | | | for I18n Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Merge remote branch 'mainstream/master' | Pratik Naik | 2010-01-17 | 1 | -44/+25 |
|\ | | | | | | | | | Conflicts: actionpack/lib/action_controller/metal/flash.rb | ||||
| * | Compile length validator options still at the class level, so whenever the ↵ | José Valim | 2010-01-08 | 1 | -42/+24 |
| | | | | | | | | validator is called, it just needs to check for :maximum, :minimum and :is values. | ||||
| * | Add validates method as shortcut to setup validators for a given set of ↵ | jamie | 2010-01-07 | 1 | -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> | ||||
* | | Merge remote branch 'mainstream/master' | Pratik Naik | 2010-01-04 | 1 | -57/+72 |
|\| | |||||
| * | ActiveRecord::Validations are now built on top of Validator as well. | José Valim | 2009-12-23 | 1 | -2/+1 |
| | | |||||
| * | validates_each uses a BlockValidator. | José Valim | 2009-12-23 | 1 | -4/+3 |
| | | |||||
| * | Added check_validity! to EachValidator and refactor existing ones. | José Valim | 2009-12-23 | 1 | -27/+37 |
| | | |||||
| * | Move validations in ActiveModel to validators, however all validatity checks ↵ | José Valim | 2009-12-23 | 1 | -42/+49 |
| | | | | | | | | are still in the class method. | ||||
* | | Clean up documentation on validates_length_of and change overly juvenile ↵ | Mike Gunderloy | 2009-09-15 | 1 | -4/+4 |
|/ | | | | example. | ||||
* | Fix exclusive range patch to use begin/end instead of min/max. [#2981 ↵ | Adam Keys | 2009-08-08 | 1 | -4/+8 |
| | | | | | | | status:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Simplyfy validates_length_of and remove puts | Pratik Naik | 2009-08-08 | 1 | -4/+7 |
| | |||||
* | validates_length_of with maximum should allow nil [#2309 status:resolved] | jzw | 2009-08-08 | 1 | -2/+4 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Properly require ActiveModel validation dependencies | Joshua Peek | 2009-06-08 | 1 | -2/+2 |
| |