#515 ✓resolved
Arkadiusz Hiler

: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


object.should be_valid_for_foo_bar

in few places

patch is tested and passes validations

Comments and changes to this ticket

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.

New-ticket Create new ticket

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


Referenced by