diff --git a/src/validation-common.js b/src/validation-common.js index 0dd5189..8706776 100644 --- a/src/validation-common.js +++ b/src/validation-common.js @@ -486,8 +486,10 @@ angular // invalid & isDirty, display the error message... if not exist then create it, else udpate the text if (!_globalOptions.hideErrorUnderInputs && !!attrs && !attrs.isValid && (isSubmitted || self.ctrl.$dirty || self.ctrl.$touched || self.ctrl.revalidateCalled)) { (errorElm.length > 0) ? errorElm.html(errorMsg) : elm.after('
' + errorMsg + '
'); + self.ctrl.errorMessageVisible = true; } else { errorElm.html(''); // element is pristine or no validation applied, error message has to be blank + self.ctrl.errorMessageVisible = undefined; } } @@ -1442,4 +1444,4 @@ angular return {}; } - }]); // validationCommon service \ No newline at end of file + }]); // validationCommon service