From 8f5ebf0a537c7c563daab95e9612edd8055efdeb Mon Sep 17 00:00:00 2001 From: Jeremy Solt Date: Mon, 17 Apr 2017 19:57:29 -0500 Subject: [PATCH] Fix revalidate for directive --- src/validation-directive.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/validation-directive.js b/src/validation-directive.js index 5ff9517..3bd2dcc 100644 --- a/src/validation-directive.js +++ b/src/validation-directive.js @@ -100,7 +100,8 @@ ctrl.revalidateCalled = true; var value = ctrl.$modelValue; - if (!!elm && elm.hasOwnProperty("isValidationCancelled")) { + var formElmObj = commonObj.getFormElementByName(ctrl.$name); + if (!!formElmObj && formElmObj.hasOwnProperty("isValidationCancelled")) { // attempt to validate & run validation callback if user requested it var validationPromise = attemptToValidate(value); if(!!_validationCallback) {