A validator that checks if each value in a container satisfies a regex expression.
More...
#include <seqan3/argument_parser/validators.hpp>
|
using | value_type = std::vector< std::string > |
| Type of values that are tested by validator.
|
|
|
(Note that these are not member functions.)
|
|
You can expect these (meta-)functions on all types that implement seqan3::validator_concept.
|
void | operator() (value_type const &cmp) const |
| Validates the value 'cmp' and throws a seqan3::validation_error on failure. More...
|
|
template<>
class seqan3::regex_validator< std::vector< std::string > >
A validator that checks if each value in a container satisfies a regex expression.
◆ regex_validator()
seqan3::regex_validator< std::vector< std::string > >::regex_validator |
( |
std::string const & |
pattern_ | ) |
|
|
inline |
Constructing from a vector.
- Parameters
-
[in] | pattern_ | The vector of valid values to test. |
◆ operator()()
void seqan3::regex_validator< std::vector< std::string > >::operator() |
( |
value_type const & |
cmp | ) |
const |
|
inline |
Tests whether cmp lies inside values.
- Parameters
-
[in] | cmp | The value to validate. |
- Exceptions
-
◆ operator()()
Validates the value 'cmp' and throws a seqan3::validation_error on failure.
- Template Parameters
-
- Parameters
-
[in,out] | cmp | The value to be validated. |
- Exceptions
-
seqan3::validation_error | if value 'cmp' does not pass validation. |
- Attention
- This is a concept requirement, not an actual function (however types satisfying this concept will provide an implementation).
The documentation for this class was generated from the following file: