feature(SatisfyAny): add a validator to ensure given value satisfies any of constraint functions, in order to validate Union Type, etc #2575
Labels
flag: needs discussion
Issues which needs discussion before implementation.
type: feature
Issues related to new features.
Description
To validate a union type, the user has to make
Custom validation
, which is not very convenient for such a commonly used type.Proposed solution
I wrote a
SatisfyAny.ts
. It works well:Usage
The text was updated successfully, but these errors were encountered: