-
Notifications
You must be signed in to change notification settings - Fork 49
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
validates :url => true also validates for presence #47
Comments
Thanks for reporting this @keilmillerjr. Do you want to send a PR ? Thanks again! |
I've been investigating a bit the other validators' behaviors and it seems they all behave the same and will throw an error if the field is blank. Have you tried something like If this still doesn't work, I'll reopen the issue. Thanks a lot! |
I am getting the same error. Tried using |
FYI it doesn't work with So you can write: validates :link_url, url: true, allow_blank: true It works for me with Rails 4.0 |
A note or example of this on the readme would be helpful. |
Done. Thanks ! |
An error should not be thrown if the field is blank. This should be handled with :presence validator.
The text was updated successfully, but these errors were encountered: