Skip to content
This repository has been archived by the owner on Dec 23, 2022. It is now read-only.

Validation: is it an array or string? #341

Open
ghost opened this issue Jan 22, 2021 · 0 comments
Open

Validation: is it an array or string? #341

ghost opened this issue Jan 22, 2021 · 0 comments
Labels

Comments

@ghost
Copy link

ghost commented Jan 22, 2021

I'm using useForms with Yup validations and a thing I'm missing from this component is a way to validate properly what is input. It happens because when I'm inserting a new chip it's a string and when I press enter it goes into an array of strings. I want to validate both the array and the string (to check length for example) but only the string is sent to onBeforeAdd or Yup.

Would you consider also sending the array to a validator or onBeforeAdd? I think it'd be way more transparent.

Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant