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

Add validator for complete node

This commit is contained in:
Kazuhito Yokoi 2023-02-10 16:49:29 +09:00
parent adfc5b3e98
commit 4fda59a585
3 changed files with 18 additions and 3 deletions

View File

@ -18,7 +18,16 @@
color:"#c0edc0", color:"#c0edc0",
defaults: { defaults: {
name: {value:""}, name: {value:""},
scope: {value:[], type:"*[]"}, scope: {
value: [],
type: "*[]",
validate: function (v, opt) {
if (v.length > 0) {
return true;
}
return RED._("node-red:complete.errors.scopeUndefined");
}
},
uncaught: {value:false} uncaught: {value:false}
}, },
inputs:0, inputs:0,

View File

@ -119,7 +119,10 @@
} }
}, },
"complete": { "complete": {
"completeNodes": "complete: __number__" "completeNodes": "complete: __number__",
"errors": {
"scopeUndefined": "scope undefined"
}
}, },
"debug": { "debug": {
"output": "Output", "output": "Output",

View File

@ -119,7 +119,10 @@
} }
}, },
"complete": { "complete": {
"completeNodes": "complete: __number__" "completeNodes": "complete: __number__",
"errors": {
"scopeUndefined": "スコープが未定義"
}
}, },
"debug": { "debug": {
"output": "対象", "output": "対象",