Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Same model validation failing Rails 5 #26191

Closed
rlopzc opened this issue Aug 17, 2016 · 3 comments
Closed

Same model validation failing Rails 5 #26191

rlopzc opened this issue Aug 17, 2016 · 3 comments

Comments

@rlopzc
Copy link

rlopzc commented Aug 17, 2016

Steps to reproduce

I have the following validation in my model:
validates :price, numericality: { greater_than_or_equal_to: 0.01 }
Entering in price -5.0 when I submit the form, it fails and it shows me the error message in the view, but when I change the validation to this (it must do the same)
validates_numericality_of :price, greather_than_or_equal_to: 0.01
Doesn't validates and it gets created/saved correctly

System configuration

Rails version: 5.0.0.1

Ruby version: 2.3.1

@sevenseacat
Copy link
Contributor

You misspelt 'greater' as 'greather'.

@rlopzc
Copy link
Author

rlopzc commented Aug 17, 2016

asdfjklask thanks @sevenseacat

@sevenseacat
Copy link
Contributor

no problem :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants