This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * The yup library has no builtin way to check if items in an array | |
| * match one or more defined shapes, we can only check against a set of | |
| * whitelisted values using yup.array().oneOf([..]). | |
| * | |
| * Using yup.addMethod() and yup.mixed().test() however we can pretty | |
| * much add any custom validation we want. The function below allows to | |
| * make validation pass for array items of different shapes. | |
| */ |
OlderNewer