# Set max length for node description

**URL:** <https://discourse.nodered.org/t/set-max-length-for-node-description/50323>\
**Category:** Developing Nodes\
**Created:** [28 August 2021 11:24 UTC](https://discourse.nodered.org/t/set-max-length-for-node-description/50323 "2021-08-28T11:24:55Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![chiche](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/chiche/32/35401_2.png) [@chiche](https://discourse.nodered.org/u/chiche)\
**Post date:** [28 August 2021 11:24 UTC](https://discourse.nodered.org/t/set-max-length-for-node-description/50323/1 "2021-08-28T11:24:56Z")

</div>

Can I set max length for description of node?

 ![desc](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/3/736688211be64bcacf102670b1f1a6cb48507510.png)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [28 August 2021 11:53 UTC](https://discourse.nodered.org/t/set-max-length-for-node-description/50323/2 "2021-08-28T11:53:11Z")

</div>

The short answer is no (not without modifying node-red core)

However, what does this have to do with dashboard? (you tagged node-red-dashboard)

And why would you want to limit the amount of help text a user can enter on a nodes description?

---

<div class="post-metadata">

**Author:** ![chiche](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/chiche/32/35401_2.png) [@chiche](https://discourse.nodered.org/u/chiche)\
**Post date:** [30 August 2021 01:52 UTC](https://discourse.nodered.org/t/set-max-length-for-node-description/50323/3 "2021-08-30T01:52:50Z")

</div>

As far as I know it uses ace-editor and currently validating the length of ace-editor is difficult. Thanks a lot!

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [30 August 2021 02:09 UTC](https://discourse.nodered.org/t/set-max-length-for-node-description/50323/4 "2021-08-30T02:09:26Z")

</div>

Hi. Sorry but your question and your response make little sense.

What are you trying to achieve and why?

---

<div class="post-metadata">

**Author:** ![chiche](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/chiche/32/35401_2.png) [@chiche](https://discourse.nodered.org/u/chiche)\
**Post date:** [30 August 2021 02:16 UTC](https://discourse.nodered.org/t/set-max-length-for-node-description/50323/5 "2021-08-30T02:16:19Z")

</div>

> However, what does this have to do with dashboard? (you tagged node-red-dashboard)

This is my mistake , I set the wrong tag

> And why would you want to limit the amount of help text a user can enter on a nodes description?

The value of node description is pushed to another server so we need to validate it before deploying

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [30 August 2021 05:07 UTC](https://discourse.nodered.org/t/set-max-length-for-node-description/50323/6 "2021-08-30T05:07:35Z")

</div>

> [@chiche](#):
>
> The value of node description is pushed to another server so we need to validate it before deploying

How do you achieve this? Are you running a custom modified version of node-red?

---

<div class="post-metadata">

**Author:** ![chiche](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/chiche/32/35401_2.png) [@chiche](https://discourse.nodered.org/u/chiche)\
**Post date:** [30 August 2021 07:25 UTC](https://discourse.nodered.org/t/set-max-length-for-node-description/50323/7 "2021-08-30T07:25:05Z")

</div>

> [@Steve-Mcl](#):
>
> How do you achieve this? Are you running a custom modified version of node-red?

I am using node-red 1.1.3 and I am developing my own node.  
I can push node description by getting node.info from editor-api module.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [30 August 2021 07:52 UTC](https://discourse.nodered.org/t/set-max-length-for-node-description/50323/8 "2021-08-30T07:52:10Z")

</div>

It would have been good if you choose the correct forum category and mentioned this in you original post. I have changed the category for you.

I believe there is a flag you can set in your node that marks it as an error. I think that property is `noerr`. So if you determine there is a problem you can set this to `1`.

I'm not 100% sure on this as I am not near a computer however it is easy enough to figure out. Create a deliberate error in a node do that you get the orange triangle, expert that done node, look in the JSON, you should spot the flag.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [30 August 2021 07:56 UTC](https://discourse.nodered.org/t/set-max-length-for-node-description/50323/9 "2021-08-30T07:56:21Z")

</div>

> [@Steve-Mcl](#):
>
> I believe there is a flag you can set in your node that marks it as an error. I think that property is `noerr` . So if you determine there is a problem you can set this to `1` .

No, that is specific to the Function node.

There is no simple way to add custom validation to the info field that applies across all nodes. It isn't something that has ever been asked for.

An alternative approach would be to use nrlint and create a custom linting rule that checks for this.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [30 August 2021 08:00 UTC](https://discourse.nodered.org/t/set-max-length-for-node-description/50323/10 "2021-08-30T08:00:46Z")

</div>

> [@knolleary](#):
>
> No, that is specific to the Function node.

Ah. I thought this was universal.

---

<div class="post-metadata">

**Author:** ![chiche](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/chiche/32/35401_2.png) [@chiche](https://discourse.nodered.org/u/chiche)\
**Post date:** [31 August 2021 02:17 UTC](https://discourse.nodered.org/t/set-max-length-for-node-description/50323/11 "2021-08-31T02:17:45Z")

</div>

Sorry, but can you tell me is there a possible solution for this case?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [31 August 2021 07:11 UTC](https://discourse.nodered.org/t/set-max-length-for-node-description/50323/12 "2021-08-31T07:11:22Z")

</div>

@chiche as I said in my reply:

> There is no simple way to add custom validation to the info field that applies across all nodes. It isn't something that has ever been asked for.

---

<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:** [14 September 2021 07:11 UTC](https://discourse.nodered.org/t/set-max-length-for-node-description/50323/13 "2021-09-14T07:11:22Z")

</div>

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