node-red-dashboard icon indicating copy to clipboard operation
node-red-dashboard copied to clipboard

UI-Form; Preloading values for number fields that have a value of zero result in data validation error

Open Bucket1616 opened this issue 6 months ago • 1 comments

Current Behavior

A pre-population message containing a valid payload which contains a value of "0" for a number-type field is filled in on the form, but marked in red presumably to indicate a data validation issue.

Expected Behavior

The expected behavior is that the number 0, when prepopulated for a number field, is determined to be a valid entry.

Steps To Reproduce

A dashboard 2.0 ui-form is added to a flow. The ui-form is given a required field of type Number and some name, such as "Input". The ui-form is set to "reset the form when submitting". The output of the ui-form is sent through a 250ms delay and then back to the ui-form input.

Deploy the flow and enter a value of the number zero for field "Input". Press submit. The form with briefly clear and the be re-populated by the delayed messages and contain a value of 0. The field "Input" will be highlighted with red indicating a data validation error.
If the field is manually cleared and replaced with a new "0", the data validation error goes away.

If the steps are followed again with a value of "1", the data validation error does not present itself.

Environment

  • Dashboard version: 1.24.2
  • Node-RED version: 3.1.15
  • Node.js version:
  • npm version:
  • Platform/OS: Windows
  • Browser: Chrome

Have you provided an initial effort estimate for this issue?

I am not a FlowFuse team member

Bucket1616 avatar Jun 22 '25 19:06 Bucket1616

Hello @joepavitt do you know the estimated date of bug fix?

gaik-a4bee avatar Sep 04 '25 18:09 gaik-a4bee