From e7189ab81f3c1fadce09a9e2ba2ab9406a656e48 Mon Sep 17 00:00:00 2001 From: Hiroyasu Nishiyama Date: Thu, 13 Jan 2022 23:52:06 +0900 Subject: [PATCH] fix unit value validation of delay node --- .../node_modules/@node-red/nodes/core/function/89-delay.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/node_modules/@node-red/nodes/core/function/89-delay.html b/packages/node_modules/@node-red/nodes/core/function/89-delay.html index 3ae4637d7..8ee404924 100644 --- a/packages/node_modules/@node-red/nodes/core/function/89-delay.html +++ b/packages/node_modules/@node-red/nodes/core/function/89-delay.html @@ -114,7 +114,8 @@ timeout: {value:"5", required:true, validate:function(v) { return RED.validators.number(v) && (v >= 0); }}, timeoutUnits: {value:"seconds"}, rate: {value:"1", required:true, validate:function(v) { return RED.validators.number(v) && (v >= 0); }}, - nbRateUnits: {value:"1", required:false, validate:RED.validators.regex(/\d+|/)}, + nbRateUnits: {value:"1", required:false, + validate:function(v) { return RED.validators.number(v) && (v >= 0); }}, rateUnits: {value: "second"}, randomFirst: {value:"1", required:true, validate:function(v) { return RED.validators.number(v) && (v >= 0); }}, randomLast: {value:"5", required:true, validate:function(v) { return RED.validators.number(v) && (v >= 0); }},