You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gives the following error:
'MyModel should ensure numericality of testfield is less than 10.1' FAILED
Expected MyModel to be invalid when testfield is greater than 9.1
The equivalent error happens on :greater_than (but NOT on the _or_equal versions).
(A workaround for floating point numbers ending in .0 is to only specify the integer part on the validator in the model class - in this case no error appears.)
The text was updated successfully, but these errors were encountered:
my_model_spec.rb:
should_validate_numericality_of :testfield, :less_than => 10.1
my_model.rb
validates_length_of :testfield, :less_than => 10.1
Gives the following error:
'MyModel should ensure numericality of testfield is less than 10.1' FAILED
Expected MyModel to be invalid when testfield is greater than 9.1
The equivalent error happens on :greater_than (but NOT on the _or_equal versions).
(A workaround for floating point numbers ending in .0 is to only specify the integer part on the validator in the model class - in this case no error appears.)
The text was updated successfully, but these errors were encountered: