|
Aria 2.0.0
C++23 MVVM framework (C++20 minimum) — reactive, coroutine-first, ABI-layered
|
#include <form.hpp>
Public Member Functions | |
| template<typename Field> | |
| void | track (Field &f) |
| template<std::predicate Pred> | |
| void | rule (Pred predicate, std::string message, std::string rule_id_value={}) |
| Add a cross-field rule. | |
| void | clear () |
Public Attributes | |
| Property< bool > | is_valid {true} |
| Property< bool > | is_dirty {false} |
| Property< bool > | is_pending {false} |
| Property< std::string > | first_error {""} |
| First-error message (string). Empty when the form is valid. | |
| Property< std::optional<::aria::Error > > | first_error_full {std::nullopt} |
| First-error record with kind / key / severity. | |
|
inline |
|
inline |
Add a cross-field rule.
rule_id defaults to "form_rule_<N>" when omitted; emitted Error has empty field_path (rules are not anchored to a single field) and source = "FormValidator".
|
inline |
| Property<bool> aria::binding::FormValidator::is_valid {true} |
| Property<bool> aria::binding::FormValidator::is_dirty {false} |
| Property<bool> aria::binding::FormValidator::is_pending {false} |
| Property<std::string> aria::binding::FormValidator::first_error {""} |
First-error message (string). Empty when the form is valid.
| Property<std::optional<::aria::Error> > aria::binding::FormValidator::first_error_full {std::nullopt} |
First-error record with kind / key / severity.