unionOf3()
unionOf3<
S1,S2,S3>(schema1,schema2,schema3,message?):UnionSchema<readonly [S1,S2,S3]>
Union schema with three specific types.
Type Parametersβ
S1: S1 extends GenericSchemaβ
S2: S2 extends GenericSchemaβ
S3: S3 extends GenericSchemaβ
Parametersβ
schema1: S1β
First schema.
schema2: S2β
Second schema.
schema3: S3β
Third schema.
message?: stringβ
Custom error message (optional).
Returns: UnionSchema<readonly [S1, S2, S3]>β
UnionSchema with three schemas.
Sinceβ
2.0.0