35 [&
value](
const auto &val) { return value.substr(0, val.size()) == val; })) {
39 return "Select a value";
40 std::ostringstream os;
41 os <<
"The value \"" <<
value <<
"\" does not start with any of the allowed values";
double value
The value of the point.
ListValidator is a validator that requires the value of a property to be one of a defined list of pos...
bool isEmpty(const T &value) const
Is the value considered empty.
std::vector< TYPE > m_allowedValues
The set of valid values.
std::string checkValidity(const std::string &value) const override
Checks if the string passed starts with one from the list.
StartsWithValidator()=default
IValidator_sptr clone() const override
Clone the validator.
std::shared_ptr< IValidator > IValidator_sptr
A shared_ptr to an IValidator.