Module inquire::validator [−][src]
Expand description
Type aliases for functions used by prompts to validate user input before returning the values to their callers.
Validators receive the user input to a given prompt and decide whether
they are valid, returning Ok(())
in the process, or invalid, returning
Err(String)
, where the String
content is an error message to be
displayed to the end user.
When creating containers of validators, e.g. when calling with_validators
in a prompt, you might need to type hint the container with one of the types
below.
This module also provides several built-in validators generated through macros,
exported with the builtin_validators
feature.
Traits
Custom trait to call correct method to retrieve input length.
Type Definitions
Type alias for validators used in DateSelect prompts.
Type alias for validators used in MultiSelect prompts.