diff --git a/nodes/core/core/80-function.html b/nodes/core/core/80-function.html
index e11e1e242..c07978a0a 100644
--- a/nodes/core/core/80-function.html
+++ b/nodes/core/core/80-function.html
@@ -20,8 +20,9 @@
@@ -59,7 +60,8 @@
defaults: {
name: {value:""},
func: {value:"\nreturn msg;"},
- outputs: {value:1}
+ outputs: {value:1},
+ valid: {value:true,required:true}
},
inputs:1,
outputs:1,
@@ -122,6 +124,16 @@
$("#node-input-name").focus();
},
oneditsave: function() {
+ var annot = this.editor.getSession().getAnnotations();
+ console.log(this);
+ this.valid = true;
+ for (var k=0; k < annot.length; k++) {
+ //console.log(annot[k].type,":",annot[k].text, "on line", annot[k].row);
+ if (annot[k].type === "error") {
+ $("#node-input-valid").val(null);
+ delete this.valid;
+ }
+ }
$("#node-input-func").val(this.editor.getValue());
delete this.editor;
}