More specific error messages #466
i-h8-github
started this conversation in
General
Replies: 2 comments 10 replies
-
|
Beta Was this translation helpful? Give feedback.
10 replies
-
For posterity, for anyone else like me who is building custom views for Rodauth, you pull the field errors via |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am trying to set up more helpful error messages for the end user if, during account creation, there should be some specific error I can inform the user of, such as password complexity not being good enough, passwords not matching, username already being taken, or what have you. However, I'm confused as to best practices along these lines.
As of now, I'm doing the checks in
before_create_account
and usingthrow_error_status(422, 'username', 'username already taken')
(as an example, yet the error message is always the default "There was an error creating your account", and no attempt to change this flash message or even see the arguments passed tothrow_error_status
has worked so far.Thank you for your time.
Beta Was this translation helpful? Give feedback.
All reactions