Maximum number of fraction digits constraint (XSD fractionDigits facet).
More...
#include <constraints.hpp>
Public Member Functions | |
| template<typename V> requires (anch::val::Number<V> || anch::val::StringLike<V>) | |
| bool | check (const V &decimal, std::string &message) const |
Public Attributes | |
| std::size_t | value |
Maximum number of fraction digits constraint (XSD fractionDigits facet).
Digits are counted as TotalDigits does (trailing zeros are not counted): integers have no fraction digit.
| bool anch::val::FractionDigits::check | ( | const V & | decimal, |
| std::string & | message ) const |
Check value
| V | the value type (number or decimal string) |
| decimal | the value |
| message | the error message (set when value is invalid) |
true when value is valid | std::size_t anch::val::FractionDigits::value |
Maximum number of fraction digits