Skip to content
This repository was archived by the owner on Jul 1, 2020. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/validation-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,15 @@ angular
* @param object validationSummary
* @param string elmName: element name
*/
function removeFromValidationSummary(validationSummary, elmName) {
var index = arrayFindObjectIndex(validationSummary, 'field', elmName); // find index of object in our array
// if message is empty, remove it from the validation summary
function removeFromValidationSummary(validationSummaryObj, elmName) {
var index = arrayFindObjectIndex(validationSummaryObj, 'field', elmName); // find index of object in our array
// if message is empty, remove it from the validation summary object
if(index >= 0) {
validationSummaryObj.splice(index, 1);
}
// also remove from 'local' validationSummary
index = arrayFindObjectIndex(validationSummary, 'field', elmName); // find index of object in our array
if(index >= 0) {
validationSummary.splice(index, 1);
}
}
Expand Down