Schema.build.union
Creates a validation builder that accepts any of the provided types.
union: <T extends (Builder | Schema<any>)[]>(
...types: T
) => Builder<Infer<T[number]>>;
Notes
- Tries to validate against each type in order until one succeeds.
Parameters
- types — The validations to try, in order.
Related
Schema.build static
An object containing functions that create Builder instances for specific types.
