28#include "val/constraints.hpp"
30namespace anch::val::detail {
40 constexpr bool validatable();
103 template<
typename P,
typename... C>
115 template<
typename P,
typename... C>
127 template<
typename P,
typename... C>
140 template<
typename P,
typename... C>
142 std::function<
void(T&,
const P&)> setter, C&&... constraints);
152 template<
typename G,
typename... C>
153 void add(
const std::string& name, G get, C&&... constraints);
187 std::vector<anch::val::Violation>
validate(
const T& value);
205#include "val/impl/validation.hpp"
Validation context.
Definition constraints.hpp:146
ValidationMapper< T > & registerField(const std::string &name, std::function< P(const T &)> getter, C &&... constraints)
ValidationMapper< T > & registerField(const std::string &name, std::function< void(T &, const P &)> setter, C &&... constraints)
ValidationMapper< T > & registerField(const std::string &name, std::function< P(const T &)> getter, std::function< void(T &, const P &)> setter, C &&... constraints)
void validate(const T &value, anch::val::ValidationContext &context) const
ValidationMapper< T > & registerField(const std::string &name, P T::*member, C &&... constraints)
static const ValidationMapper< T > & instance()
Type which can be validated: scalar ( anch::val::IsScalar ), described object ( anch::Mapping ),...
Definition validation.hpp:170
AnCH validation library namespace.
Definition mapper.hpp:150
std::vector< anch::val::Violation > validate(const T &value)
bool isValid(const T &value)