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

Accept a list of validation errors? #248

Open
cristianocca opened this issue May 5, 2018 · 0 comments
Open

Accept a list of validation errors? #248

cristianocca opened this issue May 5, 2018 · 0 comments

Comments

@cristianocca
Copy link

Currently, although validation errors (mostly server side ones) can be a list, and is properly handled by the getErrorMessages() method of the element, such list is never used to produce the error text, but instead the single message one is used (getErrorMessage()).

Since material UI accepts any element as the errorText property, it would be nice to use the error list rather than a single message, and just render each error one below the other.

Example:

This line calls the single error message method, but it could use the list one and set to errorText a list of spans or something
https://github.com/rojobuffalo/formsy-material-ui/blob/master/src/FormsyText.jsx#L139

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

No branches or pull requests

1 participant