.. index:: pair: struct; EE::UI::UIValueValidationResult .. _doxid-struct_e_e_1_1_u_i_1_1_u_i_value_validation_result: struct EE::UI::UIValueValidationResult ====================================== .. toctree:: :hidden: Overview ~~~~~~~~ Machine-readable result of converting or accepting a widget value. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include struct UIValueValidationResult { // typedefs typedef :ref:`Uint32` :target:`Code`; // fields bool :target:`valid` { true }; std::optional<:ref:`Code`> :target:`code`; std::optional :target:`debugMessage`; // methods :target:`operator bool`() const; bool :target:`operator==`(const UIValueValidationResult& other) const; bool :target:`operator!=`(const UIValueValidationResult& other) const; static UIValueValidationResult :target:`success`(); static UIValueValidationResult :target:`error`(:ref:`Code` code); static UIValueValidationResult :target:`error`(:ref:`Code` code, std::string debugMessage); static UIValueValidationResult :target:`error`(std::string debugMessage); }; .. _details-struct_e_e_1_1_u_i_1_1_u_i_value_validation_result: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Machine-readable result of converting or accepting a widget value. A numeric code is the normal way to identify an error. Applications can map that code, together with the binding or form context, to localized :ref:`UI ` text. debugMessage is optional diagnostic information for logs, tests, and inspection; it should not be shown to users implicitly. Codes are owned by the subsystem or application defining the validation rule. Apart from values in UIValueValidationError, eepp does not require codes to be globally unique or stable for serialization. Code 0 is valid: the optional itself represents the absence of a code.