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
{{ message }}
This repository was archived by the owner on Jul 1, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: readme.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ Supporting AngularJS 1.3.x
14
14
Now support <b>Service</b> using the same functionality as the <b>Directive</b>.
15
15
Huge rewrite to have a better code separation and also adding support to Service functionality. Specifically the `validation-rules` was separated to add rules without affecting the core while `validation-common` is for shared functions (shared by Directive/Service).
16
16
17
-
[Validation summary](#validation-summary) was also added recently to easily show all validation errors at same time.
17
+
[Validation summary](#validation-summary) was also recently added to easily show all validation errors that are still active on the form.
18
18
19
19
<aname="plunker"></a>
20
20
## Live Demo
@@ -118,7 +118,9 @@ P.S. For real live sample, see the [live demo](#plunker) or download the Github
118
118
119
119
<aname="validation-summary"></a>
120
120
## Validation Summary
121
-
Display a validation summary of all the current form errors. Validation summary can ben called through 2 properties `$scope.$validationSummary` and `$scope.formName.$validationSummary`(the latter will only works if you html Form object has a `name=""` attribute. For example `<form name="form1">` would then have a `$scope.form1.$validationSummary`). The code sample displayed at the bottom is only meant for showing the Validation Summary but you most probably would want to prevent form from being submitted when invalid or submit it when it does become valid, I will leave it up to you to code it the way you want.
121
+
Display a validation summary of all the current form errors. Validation summary can ben called through 2 properties `$scope.$validationSummary` and `$scope.formName.$validationSummary`(the latter will only works if your html Form object has a `name=""` attribute. For example `<form name="form1">` would then have a `$scope.form1.$validationSummary`).
122
+
123
+
*The code sample displayed at the bottom is only meant for showing the Validation Summary but you most probably would want to prevent form from being submitted when invalid or submit it when it does become valid, I will leave it up to you to code it the way you want.*
122
124
123
125
```html
124
126
<!-- Form Validation Summary -->
@@ -282,7 +284,7 @@ All validators are written as `snake_case` but it's up to the user's taste and c
282
284
<aname="project"></a>
283
285
Include it in your app project
284
286
--------------------
285
-
The validation scripts are now available in 2 formats: minified (`dist/*.js`) or uncompressed (`src/*.js`). The minified scripts are also available as 4 individual scripts (same as inside `scr/` but minified) or as an all in 1 file that englobe all of them into 1 minified file. The Directive and/or Service are totally independant and could be called together or separately BUT you will still need the `validation-rules` and `validation-common` files. Also note that `angular-translate` is also a [dependency](#dependencies).
287
+
The validation scripts are now available in 2 formats: minified (`dist/*.js`) or uncompressed (`src/*.js`). The minified scripts are available in 4 individual scripts (same as `scr/` but minified) or as an all in 1 file that englobes them all into 1 minified file. The Directive and/or Service are totally independant and could be called together or separately BUT you will still need the `validation-rules` and `validation-common` files. Also note that `angular-translate` is also a [dependency](#dependencies).
286
288
```javascript
287
289
// include it your app module ( we need both Translate & Validation)
288
290
var myApp =angular.module('myApp', ['ngRoute', 'ghiscoding.validation', 'pascalprecht.translate']);
0 commit comments