Additional information on validation of custom node

Hi there
I have a validation on my custom node using validate: function(value) {} in the HTML
However, I would like to give some more information about what exactly is wrong with the input when hovering on the red triangle.
image
Currently it only tells you which input is wrong, but this input is an editable list that can potentially have a lot of entries, I would like to be able to write a custom message explaining what exactly is wrong.
I thought about doing a node.warn() or node.error() but I dont think I can do this in the HTML.

Any ideas?
Thanks in advance

No, that is correct, you can't use those. However, Node-RED provides a notification utility for this purpose. I'll look it up and update this post when I find it.

RED.notify('Your message here', options)

You will also find some examples in uibuilder's code.

Of course, in addition, you can put in-line help information in the configuration panel to help people understand how to input correct configurations.

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