Skip to content
This repository was archived by the owner on Jul 1, 2020. It is now read-only.

Commit 5bec940

Browse files
committed
Final fix issue #55 - Bootstrap UI validation
- Fixed Bootstrap UI (or any other tool) interference with Angular-Validation, in relation to issue #55.
1 parent cf24b69 commit 5bec940

File tree

6 files changed

+12
-8
lines changed

6 files changed

+12
-8
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-validation-ghiscoding",
3-
"version": "1.4.1",
3+
"version": "1.4.2",
44
"author": "Ghislain B.",
55
"description": "Angular-Validation Directive and Service (ghiscoding)",
66
"main": [

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Angular-Validation change logs
22

3+
1.4.2 (2015-08-09) Fixed Bootstrap UI interference with Angular-Validation, in relation to issue #55.
34
1.4.1 (2015-08-09) Fixed issue #56 - TextArea validation problem with ENTER key (newline).
45
1.4.0 (2015-08-06) Tested with AngularJS 1.4.x branch. Also fixed issue #55 - ui bootsrap datepicker and angular-validation.
56
1.3.39 (2015-07-28) Fixed issue #54 - display alt text as HTML instead of escaped text, changed from `.text()` to `.html()`

dist/angular-validation.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-validation-ghiscoding",
3-
"version": "1.4.1",
3+
"version": "1.4.2",
44
"author": "Ghislain B.",
55
"description": "Angular-Validation Directive and Service (ghiscoding)",
66
"main": "app.js",

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#Angular Validation (Directive / Service)
2-
`Version: 1.4.1`
2+
`Version: 1.4.2`
33
### Form validation after user inactivity of default 1sec. (customizable timeout)
44

55
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!

src/validation-directive.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,11 @@
3030
}
3131

3232
// attach the attemptToValidate function to the element
33-
ctrl.$formatters.unshift(attemptToValidate);
34-
ctrl.$parsers.unshift(attemptToValidate);
33+
// wrap the calls into a $timeout so that if falls at the end of the $digest, because other tool like Bootstrap UI might interfere with our validation
34+
$timeout(function() {
35+
ctrl.$formatters.unshift(attemptToValidate);
36+
ctrl.$parsers.unshift(attemptToValidate);
37+
});
3538

3639
// watch the `disabled` attribute for changes
3740
// if it become disabled then skip validation else it becomes enable then we need to revalidate it

0 commit comments

Comments
 (0)