# Additional information on validation of custom node

**URL:** <https://discourse.nodered.org/t/additional-information-on-validation-of-custom-node/71708>\
**Category:** Developing Nodes\
**Created:** [5 December 2022 12:18 UTC](https://discourse.nodered.org/t/additional-information-on-validation-of-custom-node/71708 "2022-12-05T12:18:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ItsDaveTheWave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/itsdavethewave/32/65618_2.png) [@ItsDaveTheWave](https://discourse.nodered.org/u/ItsDaveTheWave)\
**Post date:** [5 December 2022 12:18 UTC](https://discourse.nodered.org/t/additional-information-on-validation-of-custom-node/71708/1 "2022-12-05T12:18:02Z")

</div>

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](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/b/cbc163c600af08878d1553d2570aba2adec437b1.png)  
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

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [5 December 2022 16:09 UTC](https://discourse.nodered.org/t/additional-information-on-validation-of-custom-node/71708/2 "2022-12-05T16:09:25Z")

</div>

> [@ItsDaveTheWave](#):
>
> I thought about doing a node.warn() or node.error() but I dont think I can do this in the HTML.

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)`

- [https://discourse.nodered.org/t/node-red-admin-ui-display-message-to-user/12290/2?u=totallyinformation](https://discourse.nodered.org/t/node-red-admin-ui-display-message-to-user/12290/2)
- [https://github.com/node-red/node-red/blob/master/packages/node\_modules/@node-red/editor-client/src/js/ui/notifications.js#L24](https://github.com/node-red/node-red/blob/master/packages/node_modules/@node-red/editor-client/src/js/ui/notifications.js#L24)

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [3 February 2023 16:10 UTC](https://discourse.nodered.org/t/additional-information-on-validation-of-custom-node/71708/3 "2023-02-03T16:10:13Z")

</div>

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