-
-
Notifications
You must be signed in to change notification settings - Fork 116
Closed
Labels
Description
I would love some more details about the expected validation behavior when defining multiple types for a field (as outlined in the Multiple Definitions For One Key section).
If I define that a field can be of type Foo or type Bar, is the field validated against both types successively and passes if at least one of the type's validation passes?
Is there a way to define a function to manually indicate which type should be used? My use case is making a survey builder. Depending on the survey being filled out, the data field of my documents can be different, but I know what to expect so ideally I would be able to specify which of the multiple possible survey schemas to validate the document against. Does that make sense?