
:length for Text properties
Reported by Arkadiusz Hiler | August 4th, 2008 @ 02:53 PM | in 0.10.0
you can limit lenght of string just by declarating:
property :foo, String, :lenght => (20..50) #or just 10
but same is not possible for Text. In my opinion it needs some unifications.
I expanded supprot of :length and added additional tests (when you would change implementation of this validation it might be useful)
in attached patch I also expanded test for String :length validation (now it also checks minimum limit for range) and changed
object.valid_for_foo_bar == true
to
object.should be_valid_for_foo_bar
in few places
patch is tested and passes validations
Comments and changes to this ticket
-
Jonathan Stott (namelessjon) November 30th, 2008 @ 09:57 AM
- Assigned user cleared.
- Milestone cleared.
- State changed from new to open
-
Michael Klishin (antares) January 10th, 2009 @ 06:59 AM
- Tag changed from dm-more, patch, suggestion to dm-more, dm-validations, patch, suggestion
- State changed from open to unconfirmed
- Assigned user set to Michael Klishin (antares)
-
Michael Klishin (antares) March 24th, 2009 @ 02:04 PM
- Milestone set to 0.10.0
- State changed from unconfirmed to confirmed
Hm. I am not sure I really buy into this idea, but as a complement to auto validations from :length option, it may be useful.
-
Michael Klishin (antares) March 24th, 2009 @ 04:02 PM
- State changed from confirmed to accepted
-
Dan Kubb (dkubb) March 25th, 2009 @ 02:54 PM
- State changed from accepted to resolved
(from [cf8c2c36b67161335b311a34a06cb72c2cb9527f]) [dm-validations] Inferred validations for :length are now supported for Text
[#515 state:resolved] http://github.com/datamapper/dm-...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
People watching this ticket
Attachments
Referenced by
-
515 :length for Text properties [#515 state:resolved] http://github.com/datamapper/dm-...