Skip to content

Commit

Permalink
Fix setValidationGroup typo
Browse files Browse the repository at this point in the history
  • Loading branch information
lvarayut committed Jun 9, 2016
1 parent bb4a763 commit 99163c8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/validator.directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
* @param groupName
* @param validity
*/
function setValiationGroup(scope, validationGroup, validity) {
function setValidationGroup(scope, validationGroup, validity) {
var validationGroupElems = document.querySelectorAll('*[validation-group=' + validationGroup + ']');

// Loop through all elements inside the group
Expand Down Expand Up @@ -175,7 +175,7 @@
if (data && data.length > 0 && data[0]) {
if (validationGroup) {
groups[validationGroup][ctrl.$name] = true;
setValiationGroup(scope, validationGroup, true);
setValidationGroup(scope, validationGroup, true);
}
return valid.success();
} else if (validationGroup) {
Expand All @@ -184,9 +184,9 @@
// Whenever the element is invalid, we'll check whether one of the elements inside the its group valid or not.
// If there is a valid element, its invalid message won't be shown, Otherwise, shows its invalid message.
if (checkValidationGroup(validationGroup)) {
setValiationGroup(scope, validationGroup, true);
setValidationGroup(scope, validationGroup, true);
} else {
setValiationGroup(scope, validationGroup, false);
setValidationGroup(scope, validationGroup, false);
return valid.error();
}
} else return valid.error();
Expand All @@ -202,7 +202,7 @@
if ($validationProvider.getExpression(validator).test(value)) {
if (validationGroup) {
groups[validationGroup][ctrl.$name] = true;
setValiationGroup(scope, validationGroup, true);
setValidationGroup(scope, validationGroup, true);
}
return valid.success();
} else if (validationGroup) {
Expand All @@ -211,9 +211,9 @@
// Whenever the element is invalid, we'll check whether one of the elements inside the its group valid or not.
// If there is a valid element, its invalid message won't be shown, Otherwise, shows its invalid message.
if (checkValidationGroup(validationGroup)) {
setValiationGroup(scope, validationGroup, true);
setValidationGroup(scope, validationGroup, true);
} else {
setValiationGroup(scope, validationGroup, false);
setValidationGroup(scope, validationGroup, false);
return valid.error();
}
} else return valid.error();
Expand Down

0 comments on commit 99163c8

Please sign in to comment.