Actions that validate a typed value after conversion.
More...
|
| struct | Min |
| | Validates that the input value is greater than or equal to MinValue. More...
|
| struct | Max |
| | Validates that the input value is less than or equal to MaxValue. More...
|
| struct | Range |
| | Validates that the input value is within the closed interval [MinValue, MaxValue]. More...
|
| struct | Positive |
| | Validates that the input value is strictly positive (> 0). More...
|
| struct | NonNegative |
| | Validates that the input value is non-negative (>= 0). More...
|
| struct | NonEmpty |
| | Validates that the input value is not empty (requires .empty() member). More...
|
| struct | NotBlank |
| | Validates that the input string is not blank (not all whitespace). More...
|
| struct | OneOf |
| | Validates that the input value equals one of the compile-time constants Allowed. More...
|
| struct | Matches |
| | Validates that the input string matches a compile-time regular expression. More...
|
| struct | Exists |
| | Validates that a std::filesystem::path exists on the filesystem. More...
|
| struct | IsRegularFile |
| | Validates that a std::filesystem::path refers to a regular file. More...
|
| struct | IsDirectory |
| | Validates that a std::filesystem::path refers to a directory. More...
|
| struct | ParentExists |
| | Validates that the parent directory of a std::filesystem::path exists. More...
|
| struct | Predicate |
| | Validates a value using a user-supplied compile-time predicate. More...
|
Actions that validate a typed value after conversion.
Each action in this namespace passes its input through unchanged on success or returns ErrorCode::validation_failed / ErrorCode::invalid_choice on failure. They are placed after a conversion action and before a pack action:
◆ exists
◆ is_directory
◆ is_regular_file
◆ matches
◆ max
template<auto MaxValue>
| auto cli::validation::max = Action<Max<MaxValue>{}>{} |
|
inlineconstexpr |
◆ min
template<auto MinValue>
| auto cli::validation::min = Action<Min<MinValue>{}>{} |
|
inlineconstexpr |
◆ non_empty
◆ non_negative
◆ not_blank
◆ one_of
template<auto... Allowed>
| auto cli::validation::one_of = Action<OneOf<Allowed...>{}>{} |
|
inlineconstexpr |
◆ parent_exists
◆ positive
◆ predicate
◆ range
template<auto MinValue, auto MaxValue>
| auto cli::validation::range = Action<Range<MinValue, MaxValue>{}>{} |
|
inlineconstexpr |