Home > @websublime/schema > StringSchemaType > pattern

StringSchemaType.pattern() method

Test a reg expression

Signature:

pattern(regexp: RegExp, errorMessage?: string): this;

Parameters

ParameterTypeDescription
regexpRegExpReg expression
errorMessagestringError message

Returns:

this