Set max length for node description

Can I set max length for description of node?

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?

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

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

What are you trying to achieve and why?

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

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.

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.

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.

Ah. I thought this was universal.

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

@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.

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