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