String format constraint ( format ).
More...
#include <constraints.hpp>
Public Member Functions | |
| template<anch::val::StringLike V> | |
| bool | check (const V &str, std::string &message) const |
Public Attributes | |
| std::string | name |
String format constraint ( format ).
The validator is found in the formats registry when the value is checked ( anch::val::registerFormat ). Unknown formats are not checked (formats are annotations in JSON Schema).
| bool anch::val::Format::check | ( | const V & | str, |
| std::string & | message ) const |
Check value
| V | the value type |
| str | the value |
| message | the error message (set when value is invalid) |
true when value is valid or format is unknown | std::string anch::val::Format::name |
Format name