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

Validate functions should be called in context of the node

This commit is contained in:
Nicholas O'Leary 2013-09-17 13:22:38 +01:00
parent d3ed9afe03
commit 1d4adecaa0

View File

@ -96,7 +96,7 @@ RED.editor = function() {
valid = value !== "";
}
if (valid && "validate" in node._def.defaults[property]) {
valid = node._def.defaults[property].validate(value);
valid = node._def.defaults[property].validate.call(node,value);
}
if (valid && node._def.defaults[property].type && RED.nodes.getType(node._def.defaults[property].type)) {
valid = (value != "_ADD_");