length()
Validates that the string has exactly the specified number of characters.
length(length: number, error?: StringConvertible): this;
Parameters
- length — The exact number of characters required.
- error — Custom error message.
Return value
This builder, for chaining.
Related
interface Schema.StringBuilder static
A validation builder for string values.
