custom
Creates a custom validation function.
const validate = custom(requirement, error);
Parameters
requirement
(value:
Maybe<
) =>FieldValue
>MaybePromise<
boolean
>error
string
Return
validate
(value:
Maybe<
) =>FieldValue
>Promise<
string
>