Replies: 1 comment 4 replies
-
don't we pass down |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I like to display a popup with the error if the user presses submit. It shows
${label} - ${errorMessage}
. I show the TextInput label and not the field name as the label is in another language, and the field name mayBeStrangeToTheUser, specially if the user doesn't know english (only ~8% of population here in Brazil know English, for example).This is my
handleSubmit
:This works, but required objects like my
signInIdToLabel
. I don't like having them. I wish the labels were only in my components.I have my own TextInput etc components. They use
useController
hook. My idea is to have a field in useController to set the field label, and they are passed to theError object
. They currently areAnd there could be a new field there as
label
, that I would enter in each field's useController.There is a metadata suggestion that maybe could also allow this, if they were passed to the errors.
I think this is really important to improve error messages.
Beta Was this translation helpful? Give feedback.
All reactions