diff --git a/site/content/docs/5.0/forms/validation.md b/site/content/docs/5.0/forms/validation.md index 0c963a674..57a786380 100644 --- a/site/content/docs/5.0/forms/validation.md +++ b/site/content/docs/5.0/forms/validation.md @@ -193,50 +193,128 @@ We recommend using client-side validation, but in case you require server-side v Validation styles are available for the following form controls and components: - ``s and ` + + + + +
+
+ @ +
+
+ +
- - + +
- - + +
- - + + +
+ +
+ + +
+ +{{< /example >}} + +## Feedback messages + +You can insert custom feedback messages with the `.valid-feedback` or `.invalid-feedback` that replaces the browser’s default feedback messages. + +{{< example >}} +
+
+ +
+ Example valid feedback text +
- +
+ Example valid feedback text +
+
+ +
+
+
+ @ +
+ +
+
+ Example invalid feedback text +
+
+ +
+ -
- -
- - +
+ Example invalid feedback text +
- +
+ + +
+
+ Example invalid feedback text +
+
+ +
+
+ + +
+
+ + +
+
+ Example invalid feedback text +
+
+ +
+ +
{{< /example >}} @@ -246,57 +324,80 @@ Validation styles are available for the following form controls and components: If your form layout allows it, you can swap the `.{valid|invalid}-feedback` classes for `.{valid|invalid}-tooltip` classes to display validation feedback in a styled tooltip. Be sure to have a parent with `position: relative` on it for tooltip positioning. In the example below, our column classes have this already, but your project may require an alternative setup. {{< example >}} -
-
- - -
- Looks good! + +
+ +
+ Example valid feedback text
-
- - -
- Looks good! + +
+ +
+ Example valid feedback text
-
- + +
- @ - -
- Please choose a unique and valid username. +
+ @
+ +
+
+ Example invalid feedback text
-
- - -
- Please provide a valid city. -
-
-
- - + + + + -
- Please select a valid state. +
+ Example invalid feedback text
-
- - -
- Please provide a valid zip. + +
+
+ + +
+
+ Example invalid feedback text
-
- + +
+
+ + +
+
+ + +
+
+ Example invalid feedback text +
+
+ +
+
+ + +
+
+ Example invalid feedback text +
{{< /example >}}