-
Notifications
You must be signed in to change notification settings - Fork 116
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
Make errors always be an array #212
Comments
I would add that it would simplify things to remove the |
This sounds like a bug to me as the |
Ah, the place I was getting hung up is because as one of the steps for the workshop I have this: const fieldErrors =
actionData?.status === 'error' ? actionData.submission.error : null
//...
<ErrorList id={titleErrorId} errors={fieldErrors?.title} /> And that is typed as |
Fixed on v0.8.0. |
Thank you :) |
I have this reusable utility for displaying errors:
Unfortunately, because Conform errors can sometimes be a single string, I have to adjust it to accommodate that:
That just kinda feels weird to me. Can we just have the errors always be an array? If people just want to display the first one they can always
[0]
to get it.The text was updated successfully, but these errors were encountered: