void
Creates a void schema.
const Schema = v.void<TMessage>(message);
Generics
TMessageextends ErrorMessage<VoidIssue> | undefined
Parameters
messageTMessage
Explanation
With void you can validate the data type of the input and if it is not undefined, you can use message to customize the error message.
Returns
SchemaVoidSchema<TMessage>
Related
The following APIs can be combined with void.
Schemas
array, exactOptional, intersect, lazy, looseObject, looseTuple, map, nonNullable, nonNullish, nonOptional, nullable, nullish, object, objectWithRest, optional, record, set, strictObject, strictTuple, tuple, tupleWithRest, undefinedable, union
Methods
assert, config, fallback, getDefault, getDefaults, getFallback, getFallbacks, is, message, parse, parser, pipe, safeParse, safeParser
Actions
check, brand, description, flavor, guard, metadata, rawCheck, rawTransform, readonly, title, transform
© Fabian Hiller
Licensed under the MIT License.
https://valibot.dev/api/void/