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

Commit 8ac3365

Browse files
committed
issue #139 isValidationCancelled tweak
1 parent 2429871 commit 8ac3365

File tree

6 files changed

+11
-10
lines changed

6 files changed

+11
-10
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.5.12",
3+
"version": "1.5.13",
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.5.13 (2016-12-29) Make sure element exist before looking for `isValidationCancelled`, issue #139
34
1.5.12 (2016-12-15) Fix a small issue introduced by last commit (Angular Form overwritten with simple object in some rare occasions).
45
1.5.11 (2016-12-15) Fix checkFormValidity with formName argument, issues #135 #139 #140 #141
56
1.5.10 (2016-12-13) Fix UI Router issue by adding a UI Router watch on $stateChangeStart, issue #137

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.5.12",
3+
"version": "1.5.13",
44
"author": "Ghislain B.",
55
"description": "Angular-Validation Directive and Service (ghiscoding)",
66
"main": "dist/angular-validation.min",

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.5.12`
2+
`Version: 1.5.13`
33
### Forms Validation with Angular made easy!
44
##### (Concept comes from the amazing Laravel)
55

src/validation-directive.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@
9292
scope.$on('angularValidation.revalidate', function(event, args){
9393
if (args == ctrl.$name)
9494
{
95-
ctrl.revalidateCalled = true;
96-
var value = ctrl.$modelValue;
95+
ctrl.revalidateCalled = true;
96+
var value = ctrl.$modelValue;
9797

98-
if (!elm.isValidationCancelled) {
98+
if (!!elm && elm.hasOwnProperty("isValidationCancelled")) {
9999
// attempt to validate & run validation callback if user requested it
100100
var validationPromise = attemptToValidate(value);
101101
if(!!_validationCallback) {
@@ -266,7 +266,7 @@
266266
var formElmObj = commonObj.getFormElementByName(ctrl.$name);
267267
var value = (typeof ctrl.$modelValue !== "undefined") ? ctrl.$modelValue : event.target.value;
268268

269-
if (!formElmObj.isValidationCancelled) {
269+
if (!!formElmObj && formElmObj.hasOwnProperty("isValidationCancelled")) {
270270
// attempt to validate & run validation callback if user requested it
271271
var validationPromise = attemptToValidate(value, 0);
272272
if(!!_validationCallback) {

0 commit comments

Comments
 (0)