Skip to content
This repository was archived by the owner on Jul 1, 2020. It is now read-only.
Merged
Changes from 1 commit
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
Prev Previous commit
fixed removeFromValidationSummary to also remove from 'local' array
before this a validationSummary entry would reappear on "go back" in
wizard.
  • Loading branch information
tlastad committed Apr 9, 2015
commit db3de376c1b8b27b210f08c5bfb6ccf77319306a
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