From 37d4a6b9e20b4465cdbd6d5683b80a036d48c194 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Sun, 13 Mar 2016 14:29:36 +0000 Subject: [PATCH] Validate fields that are $(env-vars) Closes #825 --- editor/js/ui/editor.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/editor/js/ui/editor.js b/editor/js/ui/editor.js index 339eb44c2..99690e07f 100644 --- a/editor/js/ui/editor.js +++ b/editor/js/ui/editor.js @@ -1,5 +1,5 @@ /** - * Copyright 2013, 2015 IBM Corp. + * Copyright 2013, 2016 IBM Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -116,6 +116,9 @@ RED.editor = (function() { */ function validateNodeProperty(node,definition,property,value) { var valid = true; + if (/^\$\([a-zA-Z_][a-zA-Z0-9_]*\)$/.test(value)) { + return true; + } if ("required" in definition[property] && definition[property].required) { valid = value !== ""; }