Skip to content

[Bug]: Number Control Validation Issue with 0 as input #2005

@ScottKemp

Description

@ScottKemp

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When using a number input, I set the validation to be minimum of one. With this, I am still allowed to enter 0 into the box. I know there is a "Show Validation on Empty" check box, and with that it does show the validation error.

But I don't consider 0 to be "empty". I think it is a little confusing. It is probably a JS "nullish" issue. To be "empty" means nothing is typed in.

Expected Behavior

0 is not empty for a numeric input. If I have min validation of 1, 0 should alert as a bad input, without having to check the "Show Validation on Empty" box.

Steps to reproduce

Image

Environment

2.7.4

Additional Information

No response

Metadata

Metadata

Assignees

Labels

Javascript FrontendPull requests that update Javascript code

Type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions