Optional number inputs still validate blank inputs #57

Closed
opened 2026-01-28 18:30:40 +00:00 by BobdaFett · 2 comments
BobdaFett commented 2026-01-28 18:30:40 +00:00 (Migrated from github.com)

When TextFieldType::Number components are optional, they will validate a blank input as false. This is simply because an empty string is not a valid number. There needs to be a separate gate that determines when to validate this field. It likely occurs for email fields as well.

When `TextFieldType::Number` components are optional, they will validate a blank input as false. This is simply because an empty string is not a valid number. There needs to be a separate gate that determines when to validate this field. It likely occurs for email fields as well.
BobdaFett commented 2026-02-10 14:38:08 +00:00 (Migrated from github.com)

I believe that using decimals in these number inputs also does not validate properly, specifically because the validation only checks for i32 values. This should also be fixed as a part of this issue.

I believe that using decimals in these number inputs also does not validate properly, specifically because the validation only checks for `i32` values. This should also be fixed as a part of this issue.
BobdaFett commented 2026-02-10 14:58:10 +00:00 (Migrated from github.com)

I should also mention that number inputs should accept decimals at all - right now, they block the decimal point from being added while typing.

I should also mention that number inputs should accept decimals at all - right now, they block the decimal point from being added while typing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: r15-software-dev/scholarships-rs#57