property for holding general information / flag if needed, and for adding _general errors. important: this will be excluded during serialization
holds an errors for properties, this value will be managed by validator. errors have following signature:
{
[propertyName]?: string[]
}
each property may have multiple errors, that's why errors are array for each property.
validator always accompanies model. Each model has own validator instance so referential integrity can be ensured.
{@see FormModel.getUniqueReferenceKey}
for usage in components, when e.g. you have empty instance without any identifier
serializes to object. for details refer modelToObject
Generated using TypeDoc
Wraps and holds the data and errors for it. Each instance has own validator.
Whenever you use makeFormStateWithModel they will initialize instance of this class and it will be passed to formState.
You can create form separately via makeFormModel and pass it e.g. in your own formState, or use it as nested model.
Generally FormData (holds data) - ModelValidator (validates it) - FormState (Controls logic)
form model via makeFormStateWithModel
usage makeFormModel
custom form model