# Properties in a custom validator

**URL:** <https://discourse.nodered.org/t/properties-in-a-custom-validator/77095>\
**Category:** Developing Nodes\
**Created:** [30 March 2023 22:53 UTC](https://discourse.nodered.org/t/properties-in-a-custom-validator/77095 "2023-03-30T22:53:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![drmibell](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/drmibell/32/8424_2.png) [@drmibell](https://discourse.nodered.org/u/drmibell)\
**Post date:** [30 March 2023 22:53 UTC](https://discourse.nodered.org/t/properties-in-a-custom-validator/77095/1 "2023-03-30T22:53:05Z")

</div>

I have a requirement similar to one that @BartButenaers [described](https://discourse.nodered.org/t/get-property-name-in-custom-validator/4940) some time ago. I would like to use the same custom validator for the defaults of several similar properties, but be able to pass the validator a different parameter value in each case, and have access to all of the other parameter values. Is the [workaround](https://discourse.nodered.org/t/get-property-name-in-custom-validator/4940/2) suggested by @knolleary still the best approach, and how would it play with the new `opt` parameter in the validation function?

---

<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:** [31 March 2023 16:49 UTC](https://discourse.nodered.org/t/properties-in-a-custom-validator/77095/2 "2023-03-31T16:49:11Z")

</div>

It is certainly still viable and valid, but if you want a different approach you could curry your validation function.

---

<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:** [30 May 2023 16:49 UTC](https://discourse.nodered.org/t/properties-in-a-custom-validator/77095/3 "2023-05-30T16:49:39Z")

</div>

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