From 78a866b08dde8ab9897d1bbed68f493600504150 Mon Sep 17 00:00:00 2001 From: Nicolas Coden Date: Fri, 13 Jan 2017 15:58:58 +0100 Subject: [PATCH] Add docs for Form Errors Add docs in Abide with: - Explanation about the way Form Errors are found - An example with `[data-form-error-for] --- docs/pages/abide.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/pages/abide.md b/docs/pages/abide.md index 3cf8bc5e8..ad9d10afd 100644 --- a/docs/pages/abide.md +++ b/docs/pages/abide.md @@ -115,6 +115,29 @@ These input types create a text field: `text`, `date`, `datetime`, `datetime-loc +--- + +### Form Errors + +Abide automatically detects Form Errors of an input by their class (`.form-error` by default, see the `formErrorSelector` option) when they are siblings of the input or inside the same parent. + +When the Form Errors cannot be placed next to its field, like in an Input Group, the relation can be declared with `[data-form-error-for]` attribute. + +```html_example +
+ + +
+``` + + ## Initial State ```html -- 2.47.2