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

Commit dd988fd

Browse files
authored
Merge pull request #152 from jsolt/master
Fix #150 revalidate for directive
2 parents 84607ca + 8f5ebf0 commit dd988fd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/validation-directive.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@
100100
ctrl.revalidateCalled = true;
101101
var value = ctrl.$modelValue;
102102

103-
if (!!elm && elm.hasOwnProperty("isValidationCancelled")) {
103+
var formElmObj = commonObj.getFormElementByName(ctrl.$name);
104+
if (!!formElmObj && formElmObj.hasOwnProperty("isValidationCancelled")) {
104105
// attempt to validate & run validation callback if user requested it
105106
var validationPromise = attemptToValidate(value);
106107
if(!!_validationCallback) {

0 commit comments

Comments
 (0)