> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nanoforge.eu/llms.txt
> Use this file to discover all available pages before exploring further.

# Matches

> Checks if string matches the pattern. Either matches('foo', /foo/i) If given value is not a string, then it returns false.

## Call Signature

> **Matches**(`pattern`, `validationOptions?`): `PropertyDecorator`

Defined in: node\_modules/.pnpm/class-validator\@0.14.4/node\_modules/class-validator/types/decorator/string/Matches.d.ts:13

Checks if string matches the pattern. Either matches('foo', /foo/i)
If given value is not a string, then it returns false.

### Parameters

#### pattern

`RegExp`

#### validationOptions?

`ValidationOptions`

### Returns

`PropertyDecorator`

## Call Signature

> **Matches**(`pattern`, `modifiers?`, `validationOptions?`): `PropertyDecorator`

Defined in: node\_modules/.pnpm/class-validator\@0.14.4/node\_modules/class-validator/types/decorator/string/Matches.d.ts:14

Checks if string matches the pattern. Either matches('foo', /foo/i)
If given value is not a string, then it returns false.

### Parameters

#### pattern

`string`

#### modifiers?

`string`

#### validationOptions?

`ValidationOptions`

### Returns

`PropertyDecorator`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.