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