UNPKG

778 BTypeScriptView Raw
1import { ValidationOptions } from '../ValidationOptions';
2export declare const MATCHES = "matches";
3/**
4 * Checks if string matches the pattern. Either matches('foo', /foo/i).
5 * If given value is not a string, then it returns false.
6 */
7export declare function matches(value: string, pattern: RegExp): boolean;
8export declare function matches(value: string, pattern: string, modifiers: string): boolean;
9/**
10 * Checks if string matches the pattern. Either matches('foo', /foo/i)
11 * If given value is not a string, then it returns false.
12 */
13export declare function Matches(pattern: RegExp, validationOptions?: ValidationOptions): PropertyDecorator;
14export declare function Matches(pattern: string, modifiers?: string, validationOptions?: ValidationOptions): PropertyDecorator;