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

Commit a34dc18

Browse files
authored
Merge pull request #182 from PrashantP25/patch-1
Update validation-service.js file
2 parents cc44b27 + 5f629e1 commit a34dc18

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/validation-service.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ angular
106106
self.commonObj.initialize(scope, attrs.elm, attrs, attrs.ctrl);
107107

108108
// attempt to validate & run validation callback if user requested it
109-
var validationPromise = attemptToValidate(self, event.target.value, 0);
109+
var validationPromise = attemptToValidate(self, (attrs.ctrl.$modelValue == undefined ? '' : attrs.ctrl.$modelValue), 0);
110110
if(!!_validationCallback) {
111111
self.commonObj.runValidationCallbackOnPromise(validationPromise, _validationCallback);
112112
}
@@ -574,7 +574,7 @@ angular
574574
attrs.elm.bind('blur', _blurHandler = function(event) {
575575
if (!!formElmObj && !formElmObj.isValidationCancelled) {
576576
// attempt to validate & run validation callback if user requested it
577-
var validationPromise = attemptToValidate(self, event.target.value, 10);
577+
var validationPromise = attemptToValidate(self, (attrs.ctrl.$modelValue == undefined ? '' : attrs.ctrl.$modelValue), 10);
578578
if(!!_validationCallback) {
579579
self.commonObj.runValidationCallbackOnPromise(validationPromise, _validationCallback);
580580
}
@@ -596,4 +596,4 @@ angular
596596
});
597597
}
598598

599-
}]); // ValidationService
599+
}]); // ValidationService

0 commit comments

Comments
 (0)