Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Use frozen string literal in activemodel/ | Kir Shatrov | 2017-07-16 | 1 | -0/+2 |
| | |||||
* | Revert "Merge pull request #29540 from kirs/rubocop-frozen-string" | Matthew Draper | 2017-07-02 | 1 | -1/+0 |
| | | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa. | ||||
* | Enforce frozen string in Rubocop | Kir Shatrov | 2017-07-01 | 1 | -0/+1 |
| | |||||
* | :scissors: | Ryuta Kamizono | 2017-04-13 | 1 | -1/+0 |
| | | | | [ci skip] | ||||
* | change ActiveModel::Validation to ActiveModel::Validations in comments | Sen Zhang | 2017-02-15 | 1 | -1/+1 |
| | |||||
* | let Regexp#match? be globally available | Xavier Noria | 2016-10-27 | 1 | -1/+0 |
| | | | | | | Regexp#match? should be considered to be part of the Ruby core library. We are emulating it for < 2.4, but not having to require the extension is part of the illusion of the emulation. | ||||
* | normalizes indentation and whitespace across the project | Xavier Noria | 2016-08-06 | 1 | -21/+21 |
| | |||||
* | applies new string literal convention in activemodel/lib | Xavier Noria | 2016-08-06 | 1 | -1/+1 |
| | | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default. | ||||
* | systematic revision of =~ usage in AMo | Xavier Noria | 2016-07-24 | 1 | -2/+3 |
| | |||||
* | Merge pull request #17144 from skojin/patch-doc-validation-format-z-regexp | Rafael Mendonça França | 2015-02-20 | 1 | -1/+1 |
|\ | | | | | fix mistype in doc about \z regexp | ||||
| * | fix mistype in doc about \z regexp | Sergey Kojin | 2014-10-02 | 1 | -1/+1 |
| | | | | | | | | replace \Z with regular \z | ||||
* | | add missing space.[ci skip] | Kuldeep Aggarwal | 2014-11-01 | 1 | -1/+1 |
|/ | |||||
* | revises references to :allow_(nil|blank) in some docs [ci skip] [Steven Yang ↵ | Xavier Noria | 2014-01-26 | 1 | -5/+1 |
| | | | | | | & Xavier Noria] Closes #11247. | ||||
* | 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 | ||||
* | Convert ActiveModel to 1.9 hash syntax. | Patrick Robertson | 2013-05-01 | 1 | -1/+1 |
| | | | | | I also attempted to fix other styleguide violations such as { a: :b } over {a: :b} and foo(b: 'bar') over foo( b: 'bar' ). | ||||
* | minor edits and remove mixed titles in AM::Validations docs [ci skip] | Francesco Rodriguez | 2012-10-25 | 1 | -2/+1 |
| | |||||
* | 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 | -1/+1 |
| | |||||
* | update ActiveModel::Validations::HelperMethods documentation [ci skip] | Francesco Rodriguez | 2012-07-05 | 1 | -18/+21 |
| | |||||
* | add :nodoc: to internal implementations [ci skip] | Francesco Rodriguez | 2012-06-25 | 1 | -4/+4 |
| | |||||
* | prevent users from unknowingly using bad regexps that can compromise ↵ | MrBrdo | 2012-06-14 | 1 | -3/+20 |
| | | | | security (http://homakov.blogspot.co.uk/2012/05/saferweb-injects-in-various-ruby.html) | ||||
* | 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 | -21/+32 |
| | |||||
* | 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 extra white spaces on ActiveModel docs. | Sebastian Martinez | 2011-05-23 | 1 | -2/+2 |
| | |||||
* | Remove code duplication. | José Valim | 2011-04-11 | 1 | -17/+22 |
| | |||||
* | No need to rescue here. Invoking the wrong method in an object can happen ↵ | José Valim | 2011-04-11 | 1 | -2/+0 |
| | | | | anywhere if you are not careful. In other words, test your shit. | ||||
* | Add support for proc or lambda as an option for InclusionValidator, ↵ | Prem Sichanugrist | 2011-04-10 | 1 | -10/+31 |
| | | | | | | ExclusionValidator, and FormatValidator You can now use a proc or lambda in :in option for InclusionValidator and ExclusionValidator, and :with, :without option for FormatValidator | ||||
* | 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 |
| | |||||
* | 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 | -3/+3 |
| | | | | | | | | | | | | | | | | 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 |
| | |||||
* | Add validates method as shortcut to setup validators for a given set of ↵ | jamie | 2010-01-07 | 1 | -15/+15 |
| | | | | | | | | | | | | | | | 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é Valim | 2009-12-23 | 1 | -13/+15 |
| | | | | are still in the class method. | ||||
* | Move :with/:without check outside the method generated by validates_format_of | Pratik Naik | 2009-08-10 | 1 | -6/+6 |
| | |||||
* | Add validates_format_of :without => /regexp/ option [Elliot Winkler, Peer Allan] | Elliot Winkler | 2009-08-10 | 1 | -8/+29 |
| | | | | | | | | | | [#430 state:resolved] Example : validates_format_of :subdomain, :without => /www|admin|mail/ Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Properly require ActiveModel validation dependencies | Joshua Peek | 2009-06-08 | 1 | -2/+2 |
| | |||||
* | Validation options dont need explicit :on => :save | Pratik Naik | 2009-03-21 | 1 | -1/+1 |
| | |||||
* | Move all the Active Record validations to Active Model | Pratik Naik | 2009-03-19 | 1 | -7/+9 |
| | |||||
* | Improve documentation coverage and markup | Xavier Noria | 2008-05-02 | 1 | -10/+10 |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Splitting them up first | David Heinemeier Hansson | 2008-04-01 | 1 | -0/+39 |
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9173 5ecf4fe2-1ee6-0310-87b1-e25e094e27de |