Skip to content

Commit

Permalink
Fixed issue form name work with dot
Browse files Browse the repository at this point in the history
  • Loading branch information
andersonrocha committed Jan 8, 2016
1 parent 18153dc commit 020ff80
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/angular-validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ angular.module('angularValidator').directive('angularValidator', ['$injector', '


// Only add validation messages if the form field is $dirty or the form has been submitted
if (scopeElementModel.$dirty || (scope[element.form.name] && scope[element.form.name].submitted)) {
if (scopeElementModel.$dirty || scopeForm.submitted) {

if (scopeElementModel.$error.required) {
// If there is a custom required message display it
Expand Down Expand Up @@ -272,7 +272,7 @@ angular.module('angularValidator').directive('angularValidator', ['$injector', '


// Only add/remove validation classes if the field is $dirty or the form has been submitted
if (formField.$dirty || (scopeForm.submitted)) {
if (formField.$dirty || scopeForm.submitted) {
if (formField.$invalid) {
angular.element(element.parentNode).addClass('has-error');

Expand All @@ -286,4 +286,4 @@ angular.module('angularValidator').directive('angularValidator', ['$injector', '
}
};
}
]);
]);

0 comments on commit 020ff80

Please sign in to comment.