QuestionnaireForm.Content.Error
Show validation and submission errors with retry
- Stable unknown
- Release candidate since 1.16.1-rc.3
- Development since 1.16.1-dev.2111+9796905
Content.Error reads the form's validation and submission state and returns null when there is no message and no custom children.
<QuestionnaireForm.Content.Error style={{ color: "crimson" }} />It renders a Paper Text with the error color. A custom children value replaces the
translation lookup. Otherwise the component passes submissionError first, then
errorMessage, to i18next; values that are not keys may be rendered unchanged by
the active i18next configuration. When a submission error exists, it also renders a
compact Try again button that calls the form's retrySubmit function. The component
does not provide a dismiss action or an accessibility announcement by itself; add
that behavior around it when your app requires it.
Validation messages are translation keys such as questionnaire-form.error.required-fields
and, from the paged required-item guard, questionnaire-form.error.required (English
default: This question is required). Submission errors may be backend/error strings.
Supply matching i18n resources or pass custom children.
Last updated on