PrimerLive.FieldState (PrimerLive v0.11.0)
State object with validation data for a particular form field.
Struct fields:
- caption- Field hint message that may be rendered dependent on the field state.
- changeset-- Ecto.Changesetstruct.
- field_errors- Changeset- errors, filtered for the field.
- ignore_errors?- Changeset has errors but should not be displayed (currently when- changeset.actionis- nil)
- message_id- Generated id that is used for- aria_describedby.
- message- Default message derived from changeset- errors, unless overridden by- validation_messageattribute.
- required?- True if the field is marked as required in the changeset (the- changeset.errorscontains value- [validation: :required]).
- valid?- True if changeset's- field_errorsis empty for the field.