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

select multiple validation errors not shown #165

Closed
linchen2chris opened this issue Nov 17, 2020 · 6 comments
Closed

select multiple validation errors not shown #165

linchen2chris opened this issue Nov 17, 2020 · 6 comments

Comments

@linchen2chris
Copy link

I have a field which is an array, with initial value [], I will validate it by Yup.array().required('required'), but its touched is false when submit, and validation error can not shown.

@linchen2chris
Copy link
Author

fix this and create a PR for this, waiting for merge #166

@linchen2chris
Copy link
Author

will close after PR merged

@linchen2chris linchen2chris reopened this Nov 24, 2020
@MaruniakS
Copy link

I faced up with the same issue. Sometimes error is shown, but it hides after submitting form
Yup.array().of(Yup.string()).min(1, 'Error text')

@linchen2chris
Copy link
Author

@MaruniakS actually the error is there, but array field has some problem with touched, it will hide the error

@vprsendictx
Copy link

@MaruniakS yeap, instead of setting touched to true for multi-select, it sets touched to an empty array on form submit validation.

@linchen2chris
Copy link
Author

#166 fixed it

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

3 participants