Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | add missing parentheses to validates_with documentation [skip ci] | Steve Agalloco | 2014-04-04 | 1 | -1/+1 |
| | |||||
* | Fix some validators when used on model instance | Eric Hutzelman | 2014-02-26 | 1 | -0/+2 |
| | | | | | | | | Now that Validator #setup is called from the initializer, we need a reference to the model's class to be passed in to allow the validators to continue functioning when used at the instance level. Closes #14134. | ||||
* | revises references to :allow_(nil|blank) in some docs [ci skip] [Steven Yang ↵ | Xavier Noria | 2014-01-26 | 9 | -24/+12 |
| | | | | | | & Xavier Noria] Closes #11247. | ||||
* | doc proc/lambda arg on inclusion validation. Closes #13689. [ci skip] | Yves Senn | 2014-01-13 | 1 | -1/+2 |
| | |||||
* | Adding missing backslashes in active_model files so as to avoid unwanted ↵ | aditya-kapoor | 2013-12-27 | 2 | -2/+2 |
| | | | | links in rdoc [ci skip] | ||||
* | fix email regex example code [ci skip] | Angelo capilleri | 2013-12-03 | 1 | -1/+1 |
| | | | | different from the regex in EmailValidator | ||||
* | Remove short circuit return in favor of simple conditional | Carlos Antonio da Silva | 2013-11-15 | 1 | -4/+7 |
| | |||||
* | Invert conditional to avoid double checking for Regexp | Carlos Antonio da Silva | 2013-11-15 | 1 | -11/+12 |
| | |||||
* | Only check that the option exists once instead of doing on each conditional | Carlos Antonio da Silva | 2013-11-15 | 1 | -8/+9 |
| | |||||
* | Remove argument that is accessible as attribute | Carlos Antonio da Silva | 2013-11-15 | 1 | -3/+3 |
| | |||||
* | Cache regexp source on format validation to avoid allocating new objects | Carlos Antonio da Silva | 2013-11-15 | 1 | -2/+2 |
| | | | | | | | | | Example: >> r = /some-regexp/ => /some-regexp/ >> r.source.object_id == r.source.object_id => false | ||||
* | Make code simpler to read by using a case statement | Carlos Antonio da Silva | 2013-11-15 | 1 | -2/+6 |
| | |||||
* | Avoid a new hash allocation | Carlos Antonio da Silva | 2013-11-15 | 1 | -1/+1 |
| | |||||
* | Use a simple conditional rather than short circuit with next | Carlos Antonio da Silva | 2013-11-15 | 1 | -2/+3 |
| | |||||
* | Simplify number parsing logic in numericality validation | Carlos Antonio da Silva | 2013-11-15 | 1 | -10/+3 |
| | |||||
* | Avoid creation of extra hash with merge just to set a value | Carlos Antonio da Silva | 2013-11-15 | 1 | -1/+3 |
| | |||||
* | Let validates_inclusion_of accept Time and DateTime ranges | Akira Matsuda | 2013-10-23 | 1 | -5/+11 |
| | | | | fixes 4.0.0 regression introduced in 0317b93c17a46d7663a8c36edc26ad0ba3d75f85 | ||||
* | remove evals from AM::Validations::Callbacks | Steven Yang | 2013-06-30 | 1 | -1/+3 |
| | | | | follow the same refactor at a63a964a5d1ed02cf0df1b1a33a96ed2a9fa987b | ||||
* | provide a more sementicthe local variables name for ↵ | Steven Yang | 2013-06-29 | 1 | -8/+8 |
| | | | | | | | ActiveModel::Validations::Clusivity#include? method the original name `exclusion` is a bit confusing when using with the method `inclusion_method` rename it to a more logic neutral name. | ||||
* | Use Range#cover? for Numeric ranges (tests via endpoints) and use ↵ | Charles Bergeron | 2013-05-27 | 2 | -4/+5 |
| | | | | | | Range#include? for non-numeric ranges added changelog message | ||||
* | deprecate Validator#setup (to get rid of a respond_to call). validators do ↵ | Nick Sutterer | 2013-05-23 | 3 | -3/+12 |
| | | | | their setup in their constructor now. | ||||
* | deprecating string based terminators | Aaron Patterson | 2013-05-14 | 1 | -1/+4 |
| | |||||
* | Convert ActiveModel to 1.9 hash syntax. | Patrick Robertson | 2013-05-01 | 9 | -15/+15 |
| | | | | | I also attempted to fix other styleguide violations such as { a: :b } over {a: :b} and foo(b: 'bar') over foo( b: 'bar' ). | ||||
* | `validates_confirmation_of` does not override writer methods. | Yves Senn | 2013-03-04 | 1 | -1/+5 |
| | |||||
* | Reduce number of Strings a bit | Akira Matsuda | 2013-01-07 | 2 | -3/+3 |
| | |||||
* | Revert the change at ActiveModel::Errors#add_on_blank and fix in the | Rafael Mendonça França | 2012-12-26 | 1 | -2/+2 |
| | | | | | | | | | | | right place. The EachValidator#validate already handle :allow_blank and :allow_nil, correctly. Closes #8622. Fix #8621. | ||||
* | Use :present as key for the absence validatior message | Rafael Mendonça França | 2012-12-21 | 1 | -1/+1 |
| | |||||
* | Remove ActiveModel::Errors#add_on_present method. | Rafael Mendonça França | 2012-12-21 | 1 | -2/+2 |
| | | | | | | | | We don't need to define a new method in ActiveMode::Errors for each validatior. See https://github.com/rails/rails/commit/d72a07f1d1478db9daed847eadb35bfd840674f6#commitcomment-2325333 | ||||
* | Add `ActiveModel::Validations::AbsenceValidator`, a validator to check the ↵ | Roberto Vasquez Angel | 2012-12-15 | 1 | -0/+31 |
| | | | | | | absence of attributes. Add `ActiveModel::Errors#add_on_present` method. Adds error messages to present attributes. | ||||
* | Merge pull request #7282 from xHire/validates_length_of_fix | Rafael Mendonça França | 2012-11-26 | 1 | -2/+14 |
|\ | | | | | | | | | | | | | Length validation handles correctly nil. Fix #7180 Conflicts: activemodel/CHANGELOG.md | ||||
| * | 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. | ||||
* | | cleanup, removed dispensable `require` statements from `ActiveModel` | Yves Senn | 2012-11-25 | 1 | -2/+0 |
| | | |||||
* | | cleanup, remove broken whitespace | Yves Senn | 2012-11-25 | 1 | -2/+2 |
|/ | |||||
* | Set hash value instead of using merge! | Carlos Antonio da Silva | 2012-11-04 | 1 | -1/+1 |
| | |||||
* | minor edits and remove mixed titles in AM::Validations docs [ci skip] | Francesco Rodriguez | 2012-10-25 | 9 | -21/+13 |
| | |||||
* | minor edits in AM documentation [ci skip] | Francesco Rodriguez | 2012-10-21 | 8 | -12/+12 |
| | |||||
* | Switch to using include? on validation callbacks | John Foley | 2012-09-23 | 1 | -2/+2 |
| | |||||
* | Fix collisions with before and after validation callbacks. | John Foley | 2012-09-23 | 1 | -2/+6 |
| | | | | | | This commit allows a user to do something like: before_validation :do_stuff, :on => [ :create, :update ] after_validation :do_more, :on => [ :create, :update ] | ||||
* | remove '.rb' from require call | Nihad Abbasov | 2012-09-12 | 1 | -1/+1 |
| | |||||
* | Added forgotten :message option to ActiveModel validates documentation | Anatoly Makarevich | 2012-09-07 | 1 | -3/+3 |
| | |||||
* | Accept a symbol for `:in` option on inclusion and exclusion validators | Gabriel Sobrinho | 2012-08-24 | 3 | -5/+14 |
| | |||||
* | AM::Validation#validates: ability to pass custom exception to `:strict` option | Bogdan Gusiev | 2012-08-06 | 1 | -2/+5 |
| | |||||
* | Merge branch 'master' of github.com:lifo/docrails | Vijay Dev | 2012-08-04 | 3 | -65/+130 |
|\ | | | | | | | | | | | Conflicts: activemodel/lib/active_model/secure_password.rb activerecord/lib/active_record/associations/collection_proxy.rb | ||||
| * | fix #after_validation example [ci skip] | Francesco Rodriguez | 2012-07-30 | 1 | -1/+1 |
| | | |||||
| * | update ActiveModel::Validations::Callbacks documentation [ci skip] | Francesco Rodriguez | 2012-07-29 | 1 | -18/+69 |
| | | |||||
| * | update #validates and #validates! documentation [ci skip] | Francesco Rodriguez | 2012-07-29 | 1 | -31/+43 |
| | | |||||
| * | update ActiveModel::Valdations#validates_with docs [ci skip] | Francesco Rodriguez | 2012-07-29 | 1 | -16/+18 |
| | | |||||
* | | Merge pull request #7253 from acapilleri/lenght_validator_errors_options | Rafael Mendonça França | 2012-08-03 | 1 | -2/+2 |
|\ \ | | | | | | | calculate errors_options one time in validate_each | ||||
| * | | 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 | ||||
* / | load active_support/core_ext/object/blank in active_support/rails | Xavier Noria | 2012-08-02 | 1 | -1/+0 |
|/ |