havit / Havit.Blazor

Free Bootstrap 5 components for ASP.NET Blazor + optional enterprise-level stack for Blazor development (gRPC code-first, layered architecture, localization, auth, ...)
https://havit.blazor.eu
MIT License
463 stars 63 forks source link

[HxInputNumber] Misleading validation message #818

Open franc-havit opened 1 month ago

franc-havit commented 1 month ago

Component has 2 error messages "Must be a whole number" and "Must be a decimal number". These messages are also applied when the input is outside of the bounds of the used data type.

Int64 example

image

It can be misleading for the user, because the input actually is a whole number. I would suggest adding MinValue and MaxValue parameters (already reported in issue #57) defaulting to min and max value of the used data type, and using proper error message notifying the user that input is outside of the range (defined by developer or default by data type).