-
Notifications
You must be signed in to change notification settings - Fork 29
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
Email validation not showing correct message #20
Comments
@allenwq to clarify, when doing the following: user.update(email: '[email protected]')
user.errors.full_messages.first
=> "Email is invalid" But when updating the email directly, you get the following: email.update(email: '[email protected]')
email.errors.full_messages.first
=> "Email has already been taken" |
@swrobel Yes, I get it, this is a rails behaviour. we can fix it by propagating the email errors one level up. but i am not sure if we should leave the application to handle it... let me think. |
Seems to me like this issue is indeed fixed by #24. I get this result:
|
@ArthurWD wow, I didn't expect that. @jeremylynch Can verify if this is still an issue? |
@ArthurWD that's odd, I can't seem to replicate that behavior. I still get Update: I'm able to get the same behavior that @ArthurWD sees by adding has_many :emails, autosave: true This doesn't require using the latest w/ ArthurWD's change merged. |
Email validation always returns
Email is invalid
even when the email "has already been taken" (uniqueness validation).Email validation should show "has already been taken"
The text was updated successfully, but these errors were encountered: