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

Double required messages for rails 5 belongs_to #64

Open
elbzero opened this issue Sep 13, 2019 · 0 comments
Open

Double required messages for rails 5 belongs_to #64

elbzero opened this issue Sep 13, 2019 · 0 comments

Comments

@elbzero
Copy link

elbzero commented Sep 13, 2019

Hello,

I have noticed in rails 5 belongs_to associations are required by default https://blog.bigbinary.com/2016/02/15/rails-5-makes-belong-to-association-required-by-default.html

Schema validations will also add its own validator as well. Because of this it gives a weird error message like this "Owner must exist and Owner can't be blank"

I was hoping that it could be modified to not add the validator if there was already existing validator attached to the field for this use case.

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

No branches or pull requests

1 participant