Node Edit Dialogue: JSON input complaining about being null Version 4.0.0-18

Using Docker for dev
Version 4.0.0-18

I'm creating a custom node and using an optional JSON input in the edit dialogue.

These values can be entered in the config or passed in the msg object.

tags: {value:'',required:false},
oneditprepare: function() {
    var node = this;
<div class="form-row node-input-tags">
        <label for="node-input-tags"><i class="fa fa-tag"></i> XMP Tags</label>
        <input type="text" id="node-input-tags" placeholder="">

If I edit the node configuration, I get a red ring around the input as if it's required.

If I leave it blank and save, I get the red triangle, and I can deploy even though I get the misconfiguration warning.
Screenshot 2024-06-26 at 5.36.12 PM
Screenshot 2024-06-26 at 5.36.42 PM

The node works as expected, even with the red triangle warning.
If I refresh the editor, the triangle will disappear until I edit the node configuration again.

The issue does not affect functionality; the node and the flow work as expected.
Just annoying and will have users puzzled.

Can you raise an issue on GitHub? The fact you have required set to false means the validation should allow a blank string I think.

Mmm, I will check that

Ok, TypedInput returns false because required skip the false option. Will fix that

1 Like
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.