Home > validator > yup > MixedSchema > when
Signature:
when<V>(key: string, builder: {
is: boolean | ((value: V) => boolean);
then: GetSchema<T>;
otherwise: GetSchema<T>;
}): this;
| Parameter | Type | Description |
|---|---|---|
| key | string | |
| builder | { is: boolean | ((value: V) => boolean); then: GetSchema<T>; otherwise: GetSchema<T>; } |
Returns:
this