On Sunday, March 13, 2016 at 8:43:06 PM UTC-7, Janko Marohnić wrote:
>
> I think it would be good to have these validations, although I also 
> personally didn't need them yet. One use case I can think of is validating 
> that a number isn't negative, which IMO is a very common requirement.
>
> I would just suggest a slight modification to Jeremy's idea. As a person 
> who graduated mathematics, it's unintuitive for me to think of a "greater 
> than or equal" operator >= as "not less than". It's just that when I was 
> reading these two, it took me some time to figure out what do they mean, 
> even though I knew that they're either >= or <=.
>
> I would propose that instead of "validates_not_less_than" and 
> "validates_not_greater_than", we have "validates_greater_or_equal" and 
> "validates_less_or_equal". But I wouldn't be unhappy if the first one 
> stays. Now it makes sense when I read it, it just didn't the first time.
>
> Janko
>

Nobody has spoken up against this, so I'm OK with a feature like this going 
in.  I haven't really decided on method names for the >= and <= methods.  I 
don't want validates_greater_than_or_equal or similar, it's just too long. 
validates_greater_or_equal seems odd when you have validates_greater_than, 
and validates_greater is odd as well. Maybe validates_at_least and 
validates_at_most?  I'm open to other options.

Thanks,
Jeremy 

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to