# What is opt used for in some nodes' validate:function(v,opt)

**URL:** <https://discourse.nodered.org/t/what-is-opt-used-for-in-some-nodes-validate-function-v-opt/76959>\
**Category:** Developing Nodes\
**Created:** [26 March 2023 10:25 UTC](https://discourse.nodered.org/t/what-is-opt-used-for-in-some-nodes-validate-function-v-opt/76959 "2023-03-26T10:25:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cameo69](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cameo69/32/66593_2.png) [@cameo69](https://discourse.nodered.org/u/cameo69)\
**Post date:** [26 March 2023 10:25 UTC](https://discourse.nodered.org/t/what-is-opt-used-for-in-some-nodes-validate-function-v-opt/76959/1 "2023-03-26T10:25:39Z")

</div>

[Node properties : Node-RED](https://nodered.org/docs/creating-nodes/properties#property-validation) describes how the validate function can be used.  
Its signature is given as `validate:function(v)`

But then I saw in the delay node

```auto
 validate:function(v,opt) {
      if (RED.validators.number(v) && (v >= 0)) {
          return true;
      }
      return RED._("node-red:delay.errors.invalid-timeout");
  }},

```

What is the second parameter (`opt`) used for?

---

<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:** [26 March 2023 11:05 UTC](https://discourse.nodered.org/t/what-is-opt-used-for-in-some-nodes-validate-function-v-opt/76959/2 "2023-03-26T11:05:04Z")

</div>

Hi,  
Its a message that will be displayed if you place your cursor on the red triangle at the top right of your node. See [here](https://github.com/node-red/node-red/pull/3438).

---

<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:** [9 April 2023 11:05 UTC](https://discourse.nodered.org/t/what-is-opt-used-for-in-some-nodes-validate-function-v-opt/76959/3 "2023-04-09T11:05:54Z")

</div>

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