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

Why a draft does not encode: a stable code and the message shown beside the field. More...

#include <values.hpp>

Public Member Functions

bool operator== (FieldError const &other) const =default
 Member-wise equality.

Public Attributes

std::string code
 One of malformed, too-precise, below-minimum, above-maximum, not-a-multiple, not-an-option, out-of-range, incomplete, unrepresentable.
std::string message
 The message, resolved through the session's translations (key morph.forms.error. followed by the code), else the English text.

Detailed Description

Why a draft does not encode: a stable code and the message shown beside the field.

Definition at line 37 of file values.hpp.

Member Function Documentation

◆ operator==()

bool morph::forms::FieldError::operator== ( FieldError const & other) const
default

Member-wise equality.

Parameters
otherThe other error.
Returns
true when code and message match.

Member Data Documentation

◆ code

std::string morph::forms::FieldError::code

One of malformed, too-precise, below-minimum, above-maximum, not-a-multiple, not-an-option, out-of-range, incomplete, unrepresentable.

Definition at line 40 of file values.hpp.

◆ message

std::string morph::forms::FieldError::message

The message, resolved through the session's translations (key morph.forms.error. followed by the code), else the English text.

Definition at line 43 of file values.hpp.


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