regex()
Validates that the string matches the specified regular expression.
regex(pattern: RegExp, error?: StringConvertible): this;
Parameters
- pattern — The regular expression to match.
- error — Custom error message.
Return value
This builder, for chaining.
Related
interface Schema.StringBuilder static
A validation builder for string values.
