Allow quoted property expressions

Fixes #1101
This commit is contained in:
Nick O'Leary
2017-01-06 11:23:19 +00:00
parent 08b11addec
commit 0c7705beff
6 changed files with 105 additions and 78 deletions

View File

@@ -185,7 +185,7 @@
return false;
}
} else if (ptype === 'flow' || ptype === 'global' ) {
return /^[a-zA-Z_][a-zA-Z0-9_]*(\.[a-zA-Z_][a-zA-Z0-9_]+)*/i.test(v);
return RED.utils.validatePropertyExpression(v);
} else if (ptype === 'num') {
return /^[+-]?[0-9]*\.?[0-9]*([eE][-+]?[0-9]+)?$/.test(v);
}