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

Update validation-service.js file #182

Merged
merged 1 commit into from
Apr 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/validation-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ angular
self.commonObj.initialize(scope, attrs.elm, attrs, attrs.ctrl);

// attempt to validate & run validation callback if user requested it
var validationPromise = attemptToValidate(self, event.target.value, 0);
var validationPromise = attemptToValidate(self, (attrs.ctrl.$modelValue == undefined ? '' : attrs.ctrl.$modelValue), 0);
if(!!_validationCallback) {
self.commonObj.runValidationCallbackOnPromise(validationPromise, _validationCallback);
}
Expand Down Expand Up @@ -574,7 +574,7 @@ angular
attrs.elm.bind('blur', _blurHandler = function(event) {
if (!!formElmObj && !formElmObj.isValidationCancelled) {
// attempt to validate & run validation callback if user requested it
var validationPromise = attemptToValidate(self, event.target.value, 10);
var validationPromise = attemptToValidate(self, (attrs.ctrl.$modelValue == undefined ? '' : attrs.ctrl.$modelValue), 10);
if(!!_validationCallback) {
self.commonObj.runValidationCallbackOnPromise(validationPromise, _validationCallback);
}
Expand All @@ -596,4 +596,4 @@ angular
});
}

}]); // ValidationService
}]); // ValidationService