You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ The concept is not new, it comes from the easy form input validation approach of
9
9
10
10
Let's start with a simple example and then let's get down to real business.
11
11
12
-
P.S. For real live example, please download the Github project and run the `index.html` (no server needer) while the actual form with validation is inside `templates/testingForm.html` for a better separation.
12
+
P.S. For real live example, please download the Github project and run the `index.html` (no server required, except Chrome which doesn't want to run http outside of webserver) while the actual form with validation is inside `templates/testingForm.html` for a better separation.
13
13
<aname="examples"></a>
14
14
```html
15
15
<!-- example 1 -->
@@ -37,7 +37,7 @@ P.S. For real live example, please download the Github project and run the `inde
<!-- example 4 - required select option (dropdown) -->
40
+
<!-- example 5 - required select option (dropdown) -->
41
41
<!-- Select Option if required, it has to be validated as an onBlur event -->
42
42
<!-- even if event is "keyup", the directive will use onBlur anyway for validation -->
43
43
<divclass="form-group">
@@ -57,12 +57,12 @@ P.S. For real live example, please download the Github project and run the `inde
57
57
<!-- Then we need a <span> or <div> to display the error which you can apply styling -->
58
58
<!-- VERY IMPORTANT: The Error HAS to be the following element after the input -->
59
59
<spanclass="myStyleCSS"></span>
60
-
<!-- but in some cases we cannot, then see Example Exceptions -->
60
+
<!-- but in some cases we cannot, then see below Example Exceptions -->
61
61
62
62
```
63
63
Example Exceptions
64
64
--------------------
65
-
Well let's face it, having the <span> for error display right after the <input> is not always ideal and I encounter the problem myself when I use Bootstrap on inputs with `input-group`, it had so much wrapping around the input that the next available element might not be the one we want. In these special occasion, we'll do something that is a little less "Angular way", we will add an `id` to our error element and then reference it inside our input. You could actually move the error element anywhere you want with this method, just don't forget to name it with an `id` and call the `validation-error-to` attribute.
65
+
Well let's face it, having the `<span>` for error display right after the element to be validated is not always ideal and I encounter the problem myself when using Bootstrap on inputs with `input-group`, it had so much wrapping around the input that the next available element might not be the one we want. In these special occasion, we'll do something that is a little less "Angular way", we will add an `id` to our error display element and then reference it inside our input. We could actually move the error element anywhere we want with this method, just don't forget to name it with an `id` and call the `validation-error-to` attribute. We could even do validation summary with this...just saying hehe.
66
66
```html
67
67
<divclass="form-group"ng-hide="trsn.isDividend">
68
68
<labelfor="input1">Search Input with BS input-groups</label>
0 commit comments