mixedEnum()
mixedEnum<
T>(values,message?):EnumSchema<T[number]>
Mixed enum schema - enumeration of mixed types
Type Parametersโ
T: T extends readonly [EnumValue, EnumValue]โ
Parametersโ
values: Tโ
Array of allowed mixed values (string | number | boolean)
message?: stringโ
Custom error message
Returns: EnumSchema<T[number]>โ
Schema that validates only the mixed enum values
Sinceโ
2.0.0