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",
defaults: {
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}
},
inputs:0,