twilight_validate::sticker

Function name

Source
pub fn name(value: impl AsRef<str>) -> Result<(), StickerValidationError>
Expand description

Ensure that a sticker’s name is correct.

The length must be at least STICKER_NAME_LENGTH_MIN and at most STICKER_NAME_LENGTH_MAX. This is based on this documentation entry.

§Errors

Returns an error of type NameInvalid if the length is invalid.