pub fn option(option: &CommandOption) -> Result<(), CommandValidationError>
Expand description

Validate a single CommandOption.

Errors

Returns an error of type OptionDescriptionInvalid if the description is invalid.

Returns an error of type OptionNameLengthInvalid or OptionNameCharacterInvalid if the name is invalid.