On Apr 23, 1:32 am, Kane <[email protected]> wrote:
> I'm trying validate some data in my model using such code
>
> class MyModel < Sequel::Model
>   def validates
>     validates_length_range 3..5000, :data
>   end
> end
>
> But if putting wrong values no exception raises
>
> model = MyModel.create(:data => 'f')
> puts model.valid? #=> true
>
> Deprecated method Sequel::Model.validates_length_of works fine…  What
> i should use for validations in Sequel 2.12?
>
> Artem

Validation method should be named "validate", not "validates" as in
your code
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to