Files
iD/modules/validations/many_deletions.js
T
Tom MacWright af776501d3 Require locale, second pass (#3259)
* Require locale, second pass

* Remove t global, remove t where it isn't needed
2016-07-21 16:20:13 -04:00

18 lines
452 B
JavaScript

import { t } from '../util/locale';
export function ManyDeletions() {
var threshold = 100;
var validation = function(changes) {
var warnings = [];
if (changes.deleted.length > threshold) {
warnings.push({
id: 'many_deletions',
message: t('validations.many_deletions', { n: changes.deleted.length })
});
}
return warnings;
};
return validation;
}