imei
Creates an IMEI validation action.
const Action = v.imei<TInput, TMessage>(message);
Generics
TInputextends stringTMessageextends ErrorMessage<ImeiIssue<TInput>> | undefined
Parameters
messageTMessage
Explanation
With imei you can validate the formatting of a string. If the input is not an imei, you can use message to customize the error message.
Returns
ActionImeiAction<TInput, TMessage>
Examples
The following examples show how imei can be used.
IMEI schema
Schema to validate an IMEI.
const ImeiSchema = v.pipe(v.string(), v.imei('The imei is badly formatted.'));
Related
The following APIs can be combined with imei.
Schemas
Methods
Utils
© Fabian Hiller
Licensed under the MIT License.
https://valibot.dev/api/imei/