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

Commit

Permalink
Merge pull request #144 from Gusi/errorMessageVisible
Browse files Browse the repository at this point in the history
Added errorMessageVisible at updateErrorMsg
  • Loading branch information
ghiscoding authored Jan 19, 2017
2 parents 8ac3365 + ca4b8e7 commit 6359a10
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/validation-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,10 @@ angular
// invalid & isDirty, display the error message... if <span> not exist then create it, else udpate the <span> 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('<div class="validation validation-' + elmInputName + ' text-danger">' + errorMsg + '</div>');
self.ctrl.errorMessageVisible = true;
} else {
errorElm.html(''); // element is pristine or no validation applied, error message has to be blank
self.ctrl.errorMessageVisible = undefined;
}
}

Expand Down Expand Up @@ -1442,4 +1444,4 @@ angular
return {};
}

}]); // validationCommon service
}]); // validationCommon service

0 comments on commit 6359a10

Please sign in to comment.