StringSchemaOptionsinterface
{
readonly value?: string | undefined;
readonly min?: number | undefined;
readonly max?: number | undefined;
readonly multiline?: boolean | undefined;
readonly rows?: number | undefined;
readonly match?: RegExp | undefined;
readonly case?: "upper" | "lower" | undefined;
readonly input?: StringInputType | undefined;
}| Property | Type | |
|---|---|---|
.value | string | Default string value used when the input is undefined. Defaults to "" readonly |
.min | number | Minimum allowed character length. Defaults to 0 readonly |
.max | number | Maximum allowed character length. Defaults to Number.POSITIVE_INFINITY readonly |
.multiline | boolean | Whether the string keeps line breaks (multiline sanitization). An input for it is a <textarea> that grows. Defaults to false readonly |
.rows | number | Rows a multiline input shows at first. Set 1 for a box that starts one line high, like a chat message. Single-line inputs ignore it. Defaults to `2` when `multiline`, else `1` readonly |
.match | RegExp | Regular expression the sanitized string must match. readonly |
.case | "upper""lower" | Force the result to "upper" or "lower" case. readonly |
.input | StringInputType | HTML <input /> type="" hint for downstream UIs. Defaults to "text" readonly |
Options for StringSchema.