vault/ui/docs/forms.md
Vault Automation e33118cee2
[UI] [SECVULN] Underscore Version Update (#13325) (#13343)
* removes doctoc, jsdoc-to-markdown and jsonlint packages and removes underscore version override

* removes generate-docs script which uses removed docfy-md scipt

Co-authored-by: Jordan Reimer <zofskeez@gmail.com>
2026-03-24 15:00:47 +00:00

735 B

Forms

Guidelines

  • Render FlashMessage on success
  • Handling errors/validation messages:
    • Render API errors using a <MessageError> or Hds::Alert at the top of forms
    • Display validation error messages onsubmit (not onchange for inputs)
    • Render an <AlertInline> beside form buttons, especially if the error banner is hidden from view (long forms). Message options:
      • The invalidFormMessage from a model's validate() method that includes an error count
      • Generic message for API errors or forms without model validations: 'There was an error submitting this form.'
    • Add has-error-border class to invalid inputs