Skip to main content

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