1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Add support for ${} env var syntax when skipping validation

Closes #1980

See also #825
This commit is contained in:
Nick O'Leary 2018-12-13 16:13:57 +00:00
parent a1f135bd66
commit c0837ead0e
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -130,6 +130,9 @@ RED.editor = (function() {
if (/^\$\([a-zA-Z_][a-zA-Z0-9_]*\)$/.test(value)) {
return true;
}
if (/^\$\{[a-zA-Z_][a-zA-Z0-9_]*\}$/.test(value)) {
return true;
}
if ("required" in definition[property] && definition[property].required) {
valid = value !== "";
}