# Set Bounds on Form Number Inputs

**URL:** <https://discourse.nodered.org/t/set-bounds-on-form-number-inputs/3041>\
**Category:** Dashboard\
**Created:** [11 September 2018 14:00 UTC](https://discourse.nodered.org/t/set-bounds-on-form-number-inputs/3041 "2018-09-11T14:00:18Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![zacharyalan09](https://avatars.discourse-cdn.com/v4/letter/z/a587f6/32.png) [@zacharyalan09](https://discourse.nodered.org/u/zacharyalan09)\
**Post date:** [11 September 2018 14:00 UTC](https://discourse.nodered.org/t/set-bounds-on-form-number-inputs/3041/1 "2018-09-11T14:00:18Z")

</div>

Is there a way to set an expected input value range on the form item? e.g. A user should input an angle that is between 0 and 90 degrees. Values outside of this range would be rejected when submit is chosen similar to a non-value in a required field.

Zach

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [12 September 2018 23:27 UTC](https://discourse.nodered.org/t/set-bounds-on-form-number-inputs/3041/2 "2018-09-12T23:27:05Z")

</div>

Sorry - this is not available within a form node.  
You can do this using the normal numeric picker.  
You can use a join node set to manual create key value object to wait for several widgets and to create a single msg like a form if you like.

---

<div class="post-metadata">

**Author:** ![zacharyalan09](https://avatars.discourse-cdn.com/v4/letter/z/a587f6/32.png) [@zacharyalan09](https://discourse.nodered.org/u/zacharyalan09)\
**Post date:** [13 September 2018 18:46 UTC](https://discourse.nodered.org/t/set-bounds-on-form-number-inputs/3041/3 "2018-09-13T18:46:20Z")

</div>

Thanks dceejay. That's helpful. I'll investigate the join node and see what I can come up with.

---

<div class="post-metadata">

**Author:** ![peterprib](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/peterprib/32/6974_2.png) [@peterprib](https://discourse.nodered.org/u/peterprib)\
**Post date:** [20 August 2019 05:42 UTC](https://discourse.nodered.org/t/set-bounds-on-form-number-inputs/3041/4 "2019-08-20T05:42:17Z")

</div>

Has this been put up as a suggested improvement as would have thought basic expectation for a form along with the ability set a default value. Simple addition to handle all data types would be the ability to give a regex expression for validations

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [20 August 2019 05:44 UTC](https://discourse.nodered.org/t/set-bounds-on-form-number-inputs/3041/5 "2019-08-20T05:44:26Z")

</div>

It has been suggested above... Just waiting for someone to write the code and submit the pull request.

---

<div class="post-metadata">

**Author:** ![Sulomus](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sulomus/32/49578_2.png) [@Sulomus](https://discourse.nodered.org/u/Sulomus)\
**Post date:** [3 February 2022 09:37 UTC](https://discourse.nodered.org/t/set-bounds-on-form-number-inputs/3041/6 "2022-02-03T09:37:54Z")

</div>

Has been this option added?  
Or is there any other way how to do this?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [3 February 2022 09:51 UTC](https://discourse.nodered.org/t/set-bounds-on-form-number-inputs/3041/7 "2022-02-03T09:51:46Z")

</div>

no - still waiting for volunteers.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [3 February 2022 14:12 UTC](https://discourse.nodered.org/t/set-bounds-on-form-number-inputs/3041/8 "2022-02-03T14:12:02Z")

</div>

There is always another option  
example

```auto
[{"id":"98d7fb26.26d25","type":"ui_form","z":"c791cbc0.84f648","name":"","label":"","group":"2d4fe667.28f8ba","order":23,"width":0,"height":0,"options":[{"label":"input","value":"input","type":"number","required":true,"rows":null},{"label":"name","value":"name","type":"text","required":true,"rows":null}],"formValue":{"input":"","name":""},"payload":"","submit":"submit","cancel":"cancel","topic":"topic","topicType":"msg","splitLayout":"","className":"","x":210,"y":4080,"wires":[["30579684.62f662"]]},{"id":"30579684.62f662","type":"switch","z":"c791cbc0.84f648","name":"","property":"payload.input","propertyType":"msg","rules":[{"t":"btwn","v":"0","vt":"num","v2":"10","v2t":"num"},{"t":"regex","v":"[^A-Za-z]","vt":"str","case":false},{"t":"else"}],"checkall":"false","repair":false,"outputs":3,"x":380,"y":4080,"wires":[["d7873c61.99e668"],["d51abdca.88ee18"],["a5648c52.d01338","605acf77.c5b598"]]},{"id":"d7873c61.99e668","type":"change","z":"c791cbc0.84f648","name":"","rules":[{"t":"set","p":"error","pt":"msg","to":"Error name a-z and space only","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":570,"y":4180,"wires":[["f11e6c50.61f3d8","98d7fb26.26d25"]]},{"id":"d51abdca.88ee18","type":"change","z":"c791cbc0.84f648","name":"","rules":[{"t":"set","p":"error","pt":"msg","to":"Error input not between 0 and 10","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":570,"y":4220,"wires":[["f11e6c50.61f3d8","98d7fb26.26d25"]]},{"id":"a5648c52.d01338","type":"change","z":"c791cbc0.84f648","name":"","rules":[{"t":"set","p":"error","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":570,"y":4020,"wires":[["f11e6c50.61f3d8"]]},{"id":"605acf77.c5b598","type":"debug","z":"c791cbc0.84f648","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":750,"y":4100,"wires":[]},{"id":"f11e6c50.61f3d8","type":"ui_text","z":"c791cbc0.84f648","group":"2d4fe667.28f8ba","order":24,"width":0,"height":0,"name":"","label":"","format":"{{msg.error}}","layout":"row-spread","className":"","x":810,"y":4200,"wires":[]},{"id":"2d4fe667.28f8ba","type":"ui_group","name":"demo","tab":"1caa8458.b17814","order":1,"disp":true,"width":"12","collapse":false},{"id":"1caa8458.b17814","type":"ui_tab","name":"Demo","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

**Author:** ![Sulomus](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sulomus/32/49578_2.png) [@Sulomus](https://discourse.nodered.org/u/Sulomus)\
**Post date:** [3 February 2022 14:16 UTC](https://discourse.nodered.org/t/set-bounds-on-form-number-inputs/3041/9 "2022-02-03T14:16:00Z")

</div>

Thx for your reply. I found out I need more complicated inputs in the form then the standard (dropdown menu etc.) so I choose to use UI\_template node.

But I can't get the form working in there ... I started an issue: [Trying to create Angular Form inside UI template](https://discourse.nodered.org/t/trying-to-create-angular-form-inside-ui-template/57717)
