Closed john-999 closed 1 year ago
Can you replicate this without devise involved?
Actually, yes. I happens also in a non-Devise-Controller (with all other conditions remaining the same).
Which means that I have to submit this to the Rails repo, I suppose. So I'm closing this issue.
@john-999 did you end up raising this issue in the rails repo? I'm encountering a similar issue and can't see anything related besides from this post
@JDrizzy See https://github.com/rails/rails/issues/48248 - and there is a merged pull request at the end.
Environment
Current behavior
In the
User
model, I have an attribute (User.handle
) that is encrypted and has a uniqueness validation:When I attempt to trigger this validation error (by submitting a
User
with a value for this attribute that already exists in a differentUser
), the uniqueness error message is displayed twice, instead of only once.When I output and inspect this
User
's errors in the log file, I see that 1 error message contains the unencrypted value, and a 2nd error message is added for the encrypted value.It looks like this: