Template Struct constrained_field

Struct Documentation

template<typename ValidatorT, typename FieldT>
struct udho::forms::detail::constrained_field

Public Types

enum [anonymous]

Values:

enumerator depth
typedef FieldT field_type
typedef field_type::value_type value_type
typedef ValidatorT validator_type
typedef constrained_field<validator_type, field_type> self_type

Public Functions

constrained_field(const validator_type &validator, const FieldT &field)
template<typename FormT>
bool validate(const FormT &form)
template<typename FormT>
bool operator()(const FormT &form)
const field_type &field() const
field_type &field()
bool valid() const
value_type value() const
std::string message() const
value_type operator*() const
bool operator!() const
std::string name() const
template<typename ValidatorU>
detail::constrained_field<ValidatorU, self_type> constrain(const ValidatorU &validator)
template<template<typename> class ValidatorU, typename ...ArgsT>
detail::constrained_field<ValidatorU<value_type>, self_type> constrain(ArgsT&&... args)
template<unsigned Depth>
udho::forms::detail::constraint_visitor<self_type, Depth>::validator_type &constrain()

Public Members

validator_type _validator
FieldT _field