notGraphemes
Creates a not graphemes validation action.
const Action = v.notGraphemes<TInput, TRequirement, TMessage>(
requirement,
message
);
Generics
TInputextends stringTRequirementextends numberTMessageextends ErrorMessage<NotGraphemesIssue<TInput, TRequirement>> | undefined
Parameters
requirementTRequirementmessageTMessage
Explanation
With notGraphemes you can validate the graphemes of a string. If the input does not match the requirement, you can use message to customize the error message.
Returns
ActionNotGraphemesAction<TInput, TRequirement, TMessage>
Examples
The following examples show how notGraphemes can be used.
Not graphemes schema
Schema to validate a string with more or less than 8 graphemes.
const NotGraphemesSchema = v.pipe(
v.string(),
v.notGraphemes(8, 'The string must not have 8 graphemes.')
);
Related
The following APIs can be combined with notGraphemes.
Schemas
Methods
Actions
Utils
© Fabian Hiller
Licensed under the MIT License.
https://valibot.dev/api/notGraphemes/