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.
- Added option to display only last error message instead of all
messages at once
- Added new template to display ngRepeat examples, also help
troubleshooting the follwoing bug.
- Fixed a bug (probably linked to issue #16) where changing route on
View/Controller would make the ValidationSummary fail when coming back
to original View/Controller, this bug was associated to the fact that
the ValidationSummary kept growing from Controller to Controller, now
this ValidationSummary is wipe out as soon as we detect a route change.
Copy file name to clipboardExpand all lines: changelog.txt
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -23,4 +23,5 @@ Angular-Validation change logs
23
23
1.3.19 (2015-04-20) Fixed issue #28 - unbind all 'blur' in cancelValidation() might affect other modules
24
24
1.3.20 (2015-04-21) Fixed issue #26 - validation of forms inside ng-repeat (added sample `dynamicFormView` in `more-examples` folder). And again issue #28 - unbind all 'blur' in cancelValidation() might affect other modules.
25
25
1.3.21 (2015-04-29) Moved the Alternate Text inside the $translate promise as well which removes possible delay of non-translated text appearing as alternate text (this will not affect regular text, or already translated text). Also cleanup code and made my Gulp task even more automated.
26
-
1.3.22 (2015-05-03) Added new element attribute of `friendly-name` which is used ONLY in the ValidationSummary, this friendly name is to give a better element name display, which also support translation, inside the ValidationSummary instead of just "input1" (see ValidationSummary for more details).
26
+
1.3.22 (2015-05-03) Added new element attribute of `friendly-name` which is used ONLY in the ValidationSummary, this friendly name is to give a better element name display, which also support translation, inside the ValidationSummary instead of just "input1" (see ValidationSummary for more details).
27
+
1.3.23 (2015-05-05) Added option to display only last error message instead of all messages at once. Fixed a bug where changing route on View/Controller would make the ValidationSummary fail when coming back to original View/Controller, this bug was associated to the fact that the ValidationSummary kept growing from Controller to Controller, now this ValidationSummary is wipe out as soon as we detect a route change.
Copy file name to clipboardExpand all lines: readme.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
#Angular Validation (Directive / Service)
2
-
`Version: 1.3.22`
2
+
`Version: 1.3.23`
3
3
### Form validation after user inactivity of default 1sec. (customizable timeout)
4
4
5
5
Forms Validation with Angular made easy! Angular-Validation is an angular directive/service with locales (languages) with a very simple approach of defining your `validation=""` directly within your element to validate (input, textarea, etc) and...that's it!!! The directive/service will take care of the rest!
@@ -8,7 +8,7 @@ The base concept is not new, it comes from the easy form input validation approa
8
8
9
9
For a smoother user experience, I also added validation on inactivity (timer/debounce). So validation will not bother the user while he is still typing... though as soon as the user pauses for a certain amount of time, then validation comes into play. It's worth knowing that this inactivity timer is only available while typing, if user focuses away from his input (onBlur) it will then validate instantly.
10
10
11
-
Supporting AngularJS 1.3.x *(current code should work with 1.2.x just the same but is no more verified)*
11
+
Supporting AngularJS 1.3.x *(current code should work with 1.2.x just the same, but is no more verified)*
12
12
13
13
Now support <b>Service</b> using the same functionalities as the <b>Directive</b>.
14
14
Huge rewrite to have a better code separation and also adding support to Service functionalities. Specifically the `validation-rules` was separated to add rules without affecting the core while `validation-common` is for shared functions (shared by Directive/Service).
@@ -17,7 +17,7 @@ Huge rewrite to have a better code separation and also adding support to Service
17
17
18
18
For more reasons to use it, see the answered question of: [Why Use It?](#whyuseit)
19
19
20
-
If you do use it, please click on the Star and add it as a favourite. The more star ratings there is, the more chances it could found by other users as a populate trend. That is the only support I ask you... thanks ;)
20
+
If you do use Angular-Validation, please click on the **Star** and add it as a favourite. The more star ratings there is, the more chances it could found by other users inside the popular trend section. That is the only support I ask you... thanks ;)
21
21
22
22
<aname="plunker"></a>
23
23
## Live Demo
@@ -51,7 +51,7 @@ into the following (errors will be displayed in your chosen locale translation):
The Angular-Validation will create, by itself, the necessary error message. Now imagine your form with 10 inputs, using the Angular-Validation will end up using 10 lines of code, while on the other hand using the default of Angular will give you 30 lines of code... so what are you waiting for? Use Angular-Validation!!! :)
54
+
The Angular-Validation will create, by itself, the necessary error message. Now imagine your form having 10 inputs, using the documented Angular way will end up being 30 lines of code, while on the other hand `Angular-Validation` will stay with 10 lines of code, no more... so what are you waiting for? Use Angular-Validation!!! Don't forget to add it to your favorite, click on the **Star** :)
55
55
56
56
Let's not forget the [Validation Summary](/ghiscoding/angular-validation/wiki/Validation-Summary) which is also a great and useful way of displaying your errors to the user.
varbFieldRequired=false;// by default we'll consider our field not required, if validation attribute calls it, then we'll start validating
15
-
varINACTIVITY_LIMIT=1000;// constant of maximum user inactivity time limit, this is the default cosntant but can be variable through typingLimit variable
16
-
17
-
varelm;// element object of current form element
18
-
varctrl;// ctrl object of the current form element
19
-
varscope;// scope object of the current form element
20
-
varvalue;// value of current form element
21
-
vartimer;// timer of user inactivity time
22
-
vartypingLimit;// maximum user inactivity typing limit
23
-
varformElements=[];// Array of all Form Elements, this is not a DOM Elements, these are custom objects defined as { fieldName, elm, attrs, ctrl, isValid, message }
24
-
varvalidators=[];// Array of all Form Validators
25
-
varvalidatorAttrs={};// Current Validator attributes
varbypassRootScopeReset=false;// do we want to bypass the watch on the $rootScope? False by default
14
+
varbDisplayOnlyLastErrorMsg=false;// display only 1 error message at a time, by default it's false since we will display all errors of each element
15
+
varbFieldRequired=false;// by default we'll consider our field not required, if validation attribute calls it, then we'll start validating
16
+
varINACTIVITY_LIMIT=1000;// constant of maximum user inactivity time limit, this is the default cosntant but can be variable through typingLimit variable
17
+
18
+
varelm;// element object of current form element
19
+
varctrl;// ctrl object of the current form element
20
+
varscope;// scope object of the current form element
21
+
varvalue;// value of current form element
22
+
vartimer;// timer of user inactivity time
23
+
vartypingLimit;// maximum user inactivity typing limit
24
+
varformElements=[];// Array of all Form Elements, this is not a DOM Elements, these are custom objects defined as { fieldName, elm, attrs, ctrl, isValid, message }
25
+
varvalidators=[];// Array of all Form Validators
26
+
varvalidatorAttrs={};// Current Validator attributes
0 commit comments