vtils

Home > validator > yup > StringSchema > matches

yup.StringSchema.matches() method

Signature:

matches(regex: RegExp, options?: {
        excludeEmptyString?: boolean;
        message?: StringLocale['matches'];
    }): this;

Parameters

Parameter Type Description
regex RegExp  
options { excludeEmptyString?: boolean; message?: StringLocale[‘matches’]; } (Optional)

Returns:

this