Adjusted regex

This commit is contained in:
2020-03-16 03:35:43 +11:00
parent a5b77d4d03
commit a985e496a8

View File

@@ -141,7 +141,7 @@ const parseQuery = (handler, tokens, pos, typeGraph) => {
//utils //utils
const checkAlphaNumeric = (str) => { const checkAlphaNumeric = (str) => {
if (!/^[a-z0-9]+$/i.test(str)) { if (!/^[_a-z][_a-z0-9]*$/i.test(str)) {
throw 'Unexpected string ' + str; throw 'Unexpected string ' + str;
} }
}; };