- Render
FlashMessage
on success - Handling errors/validation messages:
- Render API errors using a
<MessageError>
orHds::Alert
at the top of forms - Display validation error messages
onsubmit
(notonchange
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'svalidate()
method that includes an error count - Generic message for API errors or forms without model validations: 'There was an error submitting this form.'
- The
- Add
has-error-border
class to invalid inputs
- Render API errors using a