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

Commit 6359a10

Browse files
authored
Merge pull request #144 from Gusi/errorMessageVisible
Added errorMessageVisible at updateErrorMsg
2 parents 8ac3365 + ca4b8e7 commit 6359a10

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/validation-common.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,10 @@ angular
486486
// invalid & isDirty, display the error message... if <span> not exist then create it, else udpate the <span> text
487487
if (!_globalOptions.hideErrorUnderInputs && !!attrs && !attrs.isValid && (isSubmitted || self.ctrl.$dirty || self.ctrl.$touched || self.ctrl.revalidateCalled)) {
488488
(errorElm.length > 0) ? errorElm.html(errorMsg) : elm.after('<div class="validation validation-' + elmInputName + ' text-danger">' + errorMsg + '</div>');
489+
self.ctrl.errorMessageVisible = true;
489490
} else {
490491
errorElm.html(''); // element is pristine or no validation applied, error message has to be blank
492+
self.ctrl.errorMessageVisible = undefined;
491493
}
492494
}
493495

@@ -1442,4 +1444,4 @@ angular
14421444
return {};
14431445
}
14441446

1445-
}]); // validationCommon service
1447+
}]); // validationCommon service

0 commit comments

Comments
 (0)