Skip to content
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

Bugfix: Don't crash when validating inputs in Array #6133

Conversation

andrico1234
Copy link
Contributor

@andrico1234 andrico1234 commented Apr 7, 2021

Fixes: #6128

Looks like the problem was brought on with this commit: 9e547eb

The helperText treated the child input's error as a top level error. I think this threw an error because errors inside of Array inputs take the shape of their children, wheras InputHelperText expected anerror message as a string

I've kept the helperText logic in, but removed any of the logic involving the errors. I don't think it's necessary considering that the children display their respective error messages

@djhi
Copy link
Collaborator

djhi commented Apr 9, 2021

Unfortunately, we might have validators on the ArrayInput itself as well, such as requiring at least X elements. We must find a way to include the errors

@djhi djhi mentioned this pull request Apr 9, 2021
@andrico1234 andrico1234 closed this Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash when adding validation messages to inputs within ArrayInputs
2 participants