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

Commit

Permalink
Final fix issue #55 - Bootstrap UI validation
Browse files Browse the repository at this point in the history
- Fixed Bootstrap UI (or any other tool) interference with
Angular-Validation, in relation to issue #55.
  • Loading branch information
ghiscoding committed Aug 10, 2015
1 parent cf24b69 commit 5bec940
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-validation-ghiscoding",
"version": "1.4.1",
"version": "1.4.2",
"author": "Ghislain B.",
"description": "Angular-Validation Directive and Service (ghiscoding)",
"main": [
Expand Down
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Angular-Validation change logs

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

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-validation-ghiscoding",
"version": "1.4.1",
"version": "1.4.2",
"author": "Ghislain B.",
"description": "Angular-Validation Directive and Service (ghiscoding)",
"main": "app.js",
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Angular Validation (Directive / Service)
`Version: 1.4.1`
`Version: 1.4.2`
### Form validation after user inactivity of default 1sec. (customizable timeout)

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!
Expand Down
7 changes: 5 additions & 2 deletions src/validation-directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@
}

// attach the attemptToValidate function to the element
ctrl.$formatters.unshift(attemptToValidate);
ctrl.$parsers.unshift(attemptToValidate);
// 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
$timeout(function() {
ctrl.$formatters.unshift(attemptToValidate);
ctrl.$parsers.unshift(attemptToValidate);
});

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

0 comments on commit 5bec940

Please sign in to comment.