1#ifndef AUBO_SCOPE_KEYBOARD_INPUT_VALIDATOR_H
2#define AUBO_SCOPE_KEYBOARD_INPUT_VALIDATOR_H
36 virtual bool isValid(std::string value) = 0;
73 std::function<std::pair<uint32_t, uint32_t>()> range_func);
86 std::function<std::pair<uint32_t, uint32_t>()>
range_func_{
nullptr };
92 bool is_min_inclusive =
true,
93 bool is_max_inclusive =
true);
98 std::function<std::tuple<double, double, bool, bool>()> range_func);
110 std::function<std::pair<double, double>()>
range_func_{
nullptr };
111 std::function<std::tuple<double, double, bool, bool>()>
122 std::function<std::pair<size_t, size_t>()> range_func);
134 std::function<std::pair<size_t, size_t>()>
range_func_{
nullptr };
std::function< std::tuple< double, double, bool, bool >()> range_func_with_flags_
std::string getMessage(std::string value) override
Returns a meaningful message in case the value is not valid.
std::function< std::pair< double, double >()> range_func_
DoubleRangeValidator(double minValue, double maxValue, bool is_min_inclusive=true, bool is_max_inclusive=true)
DoubleRangeValidator(std::function< std::pair< double, double >()> range_func)
bool isValid(std::string value) override
DoubleRangeValidator(std::function< std::tuple< double, double, bool, bool >()> range_func)
std::string getMessage(std::string value) override
Returns a meaningful message in case the value is not valid.
IntegerRangeValidator(int min_value, int max_value)
IntegerRangeValidator(std::function< std::pair< int, int >()> range_func)
bool isValid(std::string value) override
std::function< std::pair< int, int >()> range_func_
std::function< std::pair< size_t, size_t >()> range_func_
StringLengthValidator(size_t min_length, size_t max_length)
bool isValid(std::string value) override
std::string getMessage(std::string value) override
Returns a meaningful message in case the value is not valid.
StringLengthValidator(std::function< std::pair< size_t, size_t >()> range_func)
std::string getMessage(std::string value) override
Returns a meaningful message in case the value is not valid.
UIntegerRangeValidator(uint32_t min_value, uint32_t max_value)
UIntegerRangeValidator(std::function< std::pair< uint32_t, uint32_t >()> range_func)
std::function< std::pair< uint32_t, uint32_t >()> range_func_
bool isValid(std::string value) override