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

**URL:** <https://discourse.nodered.org/t/node-edit-dialogue-json-input-complaining-about-being-null-version-4-0-0-18/88997>\
**Category:** Developing Nodes\
**Tags:** docker\
**Created:** [26 June 2024 21:37 UTC](https://discourse.nodered.org/t/node-edit-dialogue-json-input-complaining-about-being-null-version-4-0-0-18/88997 "2024-06-26T21:37:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![HarryPottar](https://avatars.discourse-cdn.com/v4/letter/h/bb73d2/32.png) [@HarryPottar](https://discourse.nodered.org/u/HarryPottar)\
**Post date:** [26 June 2024 21:37 UTC](https://discourse.nodered.org/t/node-edit-dialogue-json-input-complaining-about-being-null-version-4-0-0-18/88997/1 "2024-06-26T21:37:14Z")

</div>

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.

```auto
tags: {value:'',required:false},

```

```auto
oneditprepare: function() {
    var node = this;
    .......
    $("#node-input-tags").typedInput({
         type:"json",
         types:["json"]
     }),

```

```auto
<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="">
</div>

```

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](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/8/58488d1292563bf4eca148dab536f9c2ff893d9e.png)  
 ![Screenshot 2024-06-26 at 5.36.42 PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/5/b522953bf4d7403056267015dc8957318789af6d.png)

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.

---

<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:** [27 June 2024 06:52 UTC](https://discourse.nodered.org/t/node-edit-dialogue-json-input-complaining-about-being-null-version-4-0-0-18/88997/2 "2024-06-27T06:52:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [27 June 2024 06:56 UTC](https://discourse.nodered.org/t/node-edit-dialogue-json-input-complaining-about-being-null-version-4-0-0-18/88997/3 "2024-06-27T06:56:25Z")

</div>

Mmm, I will check that

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [27 June 2024 06:58 UTC](https://discourse.nodered.org/t/node-edit-dialogue-json-input-complaining-about-being-null-version-4-0-0-18/88997/4 "2024-06-27T06:58:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [27 June 2024 07:20 UTC](https://discourse.nodered.org/t/node-edit-dialogue-json-input-complaining-about-being-null-version-4-0-0-18/88997/5 "2024-06-27T07:20:02Z")

</div>

> <https://github.com/node-red/node-red/pull/4812>
>
> \- \[x\] Bugfix (non-breaking change which fixes an issue)
> \- \[\] New feature (non-…breaking change which adds functionality)
> 
> \## Proposed changes
> 
> Fix node validation if the property is not required.
> 
> Issue described on the \[Forum\](https://discourse.nodered.org/t/node-edit-dialogue-json-input-complaining-about-being-null-version-4-0-0-18/88997).
> 
> \## Checklist
> 
> \- \[x\] I have read the \[contribution guidelines\](https://github.com/node-red/node-red/blob/master/CONTRIBUTING.md)
> \- \[\] For non-bugfix PRs, I have discussed this change on the forum/slack team.
> \- \[x\] I have run \`npm run test\` to verify the unit tests pass
> \- \[\] I have added suitable unit tests to cover the new/changed functionality

---

<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:** [11 July 2024 07:20 UTC](https://discourse.nodered.org/t/node-edit-dialogue-json-input-complaining-about-being-null-version-4-0-0-18/88997/6 "2024-07-11T07:20:57Z")

</div>

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