aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/validators
Commit message (Collapse)AuthorAgeFilesLines
* Use frozen string literal in activemodel/Kir Shatrov2017-07-162-0/+4
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-022-2/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-012-0/+2
|
* :scissors:Ryuta Kamizono2017-04-131-1/+0
| | | | [ci skip]
* let Regexp#match? be globally availableXavier Noria2016-10-271-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.
* applies new string literal convention in activemodel/testXavier Noria2016-08-062-2/+2
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* use \A and \z when you mean \A and \zXavier Noria2016-07-241-1/+1
| | | | | | | | | | | | | In Ruby ^ and $ mean start and end of *line*. A regexp that validates an email should not check if some line of the string looks like an email, and maybe be surrounded by the entire Joyce's Ulysses. What the regexp has to check is if the string itself looks like an email. This validator is used only in tests, the ^/$ anchors implied no risk.
* systematic revision of =~ usage in AMoXavier Noria2016-07-241-2/+4
|
* This is not an executable fileSantiago Pastorino2010-12-161-0/+0
|
* Add support for namespaced validatorsSamuel Kadolph2010-12-161-0/+6
| | | | | | Includes test and documentation for new feature Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Add validates method as shortcut to setup validators for a given set of ↵jamie2010-01-071-0/+6
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>