Hi there. Sorry if this is already included, but I can't find any documentation or issues regarding it.
I'm looking for a way to validate that a given type is one of multiple possible types. In FP, it would look like number | string, for example. React PropTypes offers this as oneOfType. I think yup would probably have either oneOfType or .or as in .string().or(yup.number()).
Is anything like this supported?
Hi there. Sorry if this is already included, but I can't find any documentation or issues regarding it.
I'm looking for a way to validate that a given type is one of multiple possible types. In FP, it would look like
number | string, for example. React PropTypes offers this asoneOfType. I thinkyupwould probably have eitheroneOfTypeor.oras in.string().or(yup.number()).Is anything like this supported?