aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/cases/validations/length_validation_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #16381 from kakipo/validate-length-tokenizerRafael Mendonça França2015-02-131-0/+13
|\ | | | | | | Allow symbol as values for `tokenizer` of `LengthValidator`
| * Allow symbol as values for `tokenize` of `LengthValidator`kakipo2014-08-031-0/+13
| |
* | Removed magic comments # encoding: utf-8 , since its default from ruby 2.0 ↵Vipul A M2015-02-031-1/+0
|/ | | | onwards.
* Use the new clear_validators! api to reset validators in testsCarlos Antonio da Silva2014-01-271-2/+2
|
* Take care of whitespaces and changing the hash syntaxRafael Mendonça França2013-02-041-57/+56
|
* test for issue 8931David2013-02-021-0/+8
|
* Length validation handles correctly nil. Fix #7180Michal Zima2012-11-261-0/+39
| | | | When nil or empty string are not allowed, they are not valid.
* To infinity… and beyond!Niels Ganser2012-02-061-0/+18
| | | | | | | 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
* Remove dead code from AMo.José Valim2011-12-201-47/+37
|
* Follow code conventions on some testsSebastian Martinez2011-05-101-15/+15
|
* Refactor length validationSantiago Pastorino2011-03-121-3/+3
|
* length validation for fixnumsAndriy Tyurnikov2011-03-121-0/+11
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Failing test for validates_length_of, when both too_short and too_long ↵rohit2010-08-031-0/+14
| | | | | | messages are set [#5283 state:open] Signed-off-by: José Valim <jose.valim@gmail.com>
* removed AR from all AMo tests, including any unneeded files (schema, ↵Josh Kalderimis2010-05-091-2/+0
| | | | fixtures and test helper)
* removed an old unused model in the AMo tests which also removes another AR ↵Josh Kalderimis2010-05-091-1/+0
| | | | dependency
* removed use of AR in AMo tests and removed testing of scopes (:on) in ↵Josh Kalderimis2010-05-081-140/+53
| | | | individual validation tests and moved them to their own test file
* Favor %{} in all code instead of (deprecated) {{}} as interpolation syntax ↵Lawrence Pit2010-05-031-12/+12
| | | | | | for I18n Signed-off-by: José Valim <jose.valim@gmail.com>
* Compile length validator options still at the class level, so whenever the ↵José Valim2010-01-081-4/+2
| | | | validator is called, it just needs to check for :maximum, :minimum and :is values.
* No need to use ValidationsRepairHelper hack on ActiveModel anymore, ↵José Valim2009-12-231-41/+12
| | | | Model.reset_callbacks(:validate) is enough. However, tests in ActiveRecord are still coupled, so moved ValidationsRepairHelper back there.
* Fix exclusive range patch to use begin/end instead of min/max. [#2981 ↵Adam Keys2009-08-081-0/+14
| | | | | | | 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 putsPratik Naik2009-08-081-1/+0
|
* validates_length_of with maximum should allow nil [#2309 status:resolved]jzw2009-08-081-3/+7
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Add ActiveModel::Validations tests for regular ruby classesPratik Naik2009-03-201-0/+17
|
* Add I18n translations to ActiveModel and move more AR specific parts to ↵Pratik Naik2009-03-201-11/+0
| | | | ActiveRecord::Validations
* Deprecate Error#on(attribute) in favour of Errors#[attribute]Pratik Naik2009-03-201-26/+26
|
* TestDatabase -> TestsDatabasePratik Naik2009-03-201-2/+2
|
* Move relevant validation tests from Active Record to Active ModelPratik Naik2009-03-201-0/+443