improve category and label name validation (#1034)

This commit is contained in:
Bruce Martin
2019-11-13 09:40:37 -08:00
committed by GitHub
parent 04c83993d2
commit a52e86a69b
3 changed files with 136 additions and 55 deletions
@@ -182,3 +182,8 @@ export function createWritableAnnotationDimensions(world, crossfilter) {
}, crossfilter);
return crossfilter;
}
const legalNames = /^\w+$/;
export function isLegalAnnotationName(name) {
return legalNames.test(name);
}