NumericRangeValidator allow NULL values

Please add a Proporty "AllowNull" to NumericRange validators

Hi @Foizman,

Numeric range is usually between two numbers, not by null and number. Maybe you can use RequiredValidator in your case.

Well in many cases a numeric field can either be empty (NULL), or must be between 2 values (MIN, MAX).

Come on, Enchev, that's not a big deal :wink:

This would be fantastic if implemented, I need this really urgently

Hey @antday,

We accept pull requests.

Hi. Usually, but just barely. Quite often in the json-coms world, a numeric field is recognized (via serializer settings) as enabled if it has a value in it and disabled/optional if it has a null in it. Since Blazor pages often map directly to C#-serialized-to-json objects, your current NumericRangeValidator will not work since it prohibits the (quite usual) case of an optional (null) field. The RequiredValidator does not appear to be a valid solution, nor is the pull request, which didn't work either? If you do not want to fix this, please let us know how to realistically resolve it. This applies to all validators actually, at least the ones for types that can be mapped to json properties. Thanks.

Not sure I understand your post. You submitted pull request?

We are not sure how to fix this and that’s why we cannot fix it. Feel free to submit pull request with a fix.