morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
morph::forms::ConstraintViolation Struct Reference

One violation: which field, and which declared key it broke. More...

#include <instance_constraints.hpp>

Public Member Functions

bool operator== (const ConstraintViolation &other) const noexcept=default
 Value equality, so violations can be compared in tests.

Public Attributes

std::string field
 The offending field's wire (JSON) name.
ConstraintViolationKind kind {ConstraintViolationKind::BelowMinimum}
 What was violated.

Detailed Description

One violation: which field, and which declared key it broke.

Definition at line 78 of file instance_constraints.hpp.

Member Function Documentation

◆ operator==()

bool morph::forms::ConstraintViolation::operator== ( const ConstraintViolation & other) const
nodiscarddefaultnoexcept

Value equality, so violations can be compared in tests.

Parameters
otherThe violation to compare against.
Returns
true when both the field and the kind match.

Member Data Documentation

◆ field

std::string morph::forms::ConstraintViolation::field

The offending field's wire (JSON) name.

Definition at line 80 of file instance_constraints.hpp.

◆ kind

ConstraintViolationKind morph::forms::ConstraintViolation::kind {ConstraintViolationKind::BelowMinimum}

What was violated.

Definition at line 82 of file instance_constraints.hpp.


The documentation for this struct was generated from the following file: