Home > validator > yup > StringSchema > matches
Signature:
matches(regex: RegExp, options?: {
excludeEmptyString?: boolean;
message?: StringLocale['matches'];
}): this;
| Parameter | Type | Description |
|---|---|---|
| regex | RegExp | |
| options | { excludeEmptyString?: boolean; message?: StringLocale[‘matches’]; } | (Optional) |
Returns:
this