Exact length constraint (XSD length facet).
More...
#include <constraints.hpp>
Exact length constraint (XSD length facet).
Length of a string is its number of Unicode code points (UTF-8), length of a collection its number of items (XSD lists).
- Author
- Vincent Lachenal
- Since
- 0.3
◆ check() [1/2]
| bool anch::val::Length::check |
( |
const V & | items, |
|
|
std::string & | message ) const |
Check number of items
- Template Parameters
-
- Parameters
-
| items | the collection |
| message | the error message (set when value is invalid) |
- Returns
true when value is valid
◆ check() [2/2]
| bool anch::val::Length::check |
( |
const V & | str, |
|
|
std::string & | message ) const |
Check string length
- Template Parameters
-
- Parameters
-
| str | the value |
| message | the error message (set when value is invalid) |
- Returns
true when value is valid
◆ value
| std::size_t anch::val::Length::value |
The documentation for this struct was generated from the following file: