Skip to content

Commit

Permalink
MGRS validation was overly restrictive. Loosened the requirements a bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
Johnathan Garrett committed Jan 19, 2016
1 parent 2ba861e commit 01115da
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/common/utils/UtilsModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -471,14 +471,7 @@
}
} else if (scope.coordDisplay.value === coordinateDisplays.MGRS) {
var mgrs = scope.coordinates.replace(/\s+/g, '').toUpperCase();
if (mgrs.length % 2 !== 0 && /^([0-5][0-9]|60)[A-Z]{3}[0-9]+$/.test(mgrs)) {
valid = true;
}
if (valid === true && validateMGRS(mgrs)) {
valid = true;
} else {
valid = false;
}
valid = /^([0-5]?[0-9]|60)[A-Z]{3}[0-9]+$/.test(mgrs) && validateMGRS(mgrs);
} else {
split = scope.coordinates.replace(/[^\d-\.]/g, ' ').split(' ');
clean(split, '');
Expand Down

0 comments on commit 01115da

Please sign in to comment.