mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-14 12:21:24 +01:00
* format readme to prepare for pattern info * small text changes * add markdown files for each section * readme updates * routing md draft * add table of contents * add oidc pr sample * update routing * add decorator section * serializer docs * add table of contents * update readme * add title * add decorator section * models readme * update comments * modify examples * add bullets and more comments * what the heck fix bullet * model docs * form docs * routing doc * serializer/adapter * adds docs for model-validations decorator (#20596) * UI Docs: Components (#20602) * Add CSS best practices (#20370) * wip--saving work * wip * friday morning.... * update * fix exists to exist * one more change * UI docs: Add ember engine creation documentation (#20789) --------- Co-authored-by: Jordan Reimer <zofskeez@gmail.com> Co-authored-by: Chelsea Shaw <82459713+hashishaw@users.noreply.github.com> Co-authored-by: Angel Garbarino <Monkeychip@users.noreply.github.com> Co-authored-by: Kianna <30884335+kiannaquach@users.noreply.github.com>
20 lines
948 B
Markdown
20 lines
948 B
Markdown
# Forms
|
|
|
|
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
|
|
|
- [Guidelines](#guidelines)
|
|
|
|
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
|
|
|
## Guidelines
|
|
|
|
- Render `FlashMessage` on success
|
|
- Handling errors/validation messages:
|
|
- Render API errors using the `AlertBanner` at the top of forms
|
|
- Display validation error messages `onsubmit` (not `onchange` for inputs)
|
|
- Render an `<AlertInline>` [beside](../lib/pki/addon/components/pki-role-generate.hbs) 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
|