trim
Creates a trim transformation action.
const Action = v.trim();
Returns
ActionTrimAction
Examples
The following examples show how trim can be used.
Trimmed string
Schema to trim the start and end of a string.
const StringSchema = v.pipe(v.string(), v.trim());
Related
The following APIs can be combined with trim.
Schemas
Methods
Utils
© Fabian Hiller
Licensed under the MIT License.
https://valibot.dev/api/trim/