# Numeric text box Min Max work only first time

**URL:** <https://forum.radzen.com/t/numeric-text-box-min-max-work-only-first-time/6209>\
**Category:** Radzen.Blazor Components\
**Created:** [January 5, 2021, 5:07pm UTC](https://forum.radzen.com/t/numeric-text-box-min-max-work-only-first-time/6209 "2021-01-05T17:07:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rejirv](https://forum.radzen.com/letter_avatar_proxy/v4/letter/r/db5fbb/32.png) [@rejirv](https://forum.radzen.com/u/rejirv)\
**Post date:** [January 5, 2021, 5:07pm UTC](https://forum.radzen.com/t/numeric-text-box-min-max-work-only-first-time/6209/1 "2021-01-05T17:07:39Z")

</div>

Numeric text box with Min Max validation only works in the first time. In the Numeric text with Min set to 1 and Max set to 10, if I enter 1000 it works first time. Next time if I enter 1000 it accepts. You can repro this issue in the portal itself - [https://blazor.radzen.com/numeric](https://blazor.radzen.com/numeric)

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [January 6, 2021, 7:58am UTC](https://forum.radzen.com/t/numeric-text-box-min-max-work-only-first-time/6209/2 "2021-01-06T07:58:23Z")

</div>

Confirmed and fixed immediately.

---

<div class="post-metadata">

**Author:** ![rejirv](https://forum.radzen.com/letter_avatar_proxy/v4/letter/r/db5fbb/32.png) [@rejirv](https://forum.radzen.com/u/rejirv)\
**Post date:** [January 6, 2021, 9:27am UTC](https://forum.radzen.com/t/numeric-text-box-min-max-work-only-first-time/6209/3 "2021-01-06T09:27:02Z")

</div>

Thank you. Is this update available for download? We are using version 2.18.6.

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [January 6, 2021, 9:37am UTC](https://forum.radzen.com/t/numeric-text-box-min-max-work-only-first-time/6209/4 "2021-01-06T09:37:40Z")

</div>

Of course it is. It’s published as usual to NuGet.

---

<div class="post-metadata">

**Author:** ![rejirv](https://forum.radzen.com/letter_avatar_proxy/v4/letter/r/db5fbb/32.png) [@rejirv](https://forum.radzen.com/u/rejirv)\
**Post date:** [January 6, 2021, 10:41am UTC](https://forum.radzen.com/t/numeric-text-box-min-max-work-only-first-time/6209/5 "2021-01-06T10:41:42Z")

</div>

Thank you for the help. Is it possible to set a MaxLength property to Numeric text box?

---

<div class="post-metadata">

**Author:** ![opcushing](https://forum.radzen.com/letter_avatar_proxy/v4/letter/o/f6c823/32.png) [@opcushing](https://forum.radzen.com/u/opcushing)\
**Post date:** [July 17, 2023, 3:39pm UTC](https://forum.radzen.com/t/numeric-text-box-min-max-work-only-first-time/6209/6 "2023-07-17T15:39:59Z")

</div>

Hi. It appears I'm using a more recent version of Radzen, but am still running into the same issue.

The Max only works on the first input. I am able to type something in, have it be set and then continue typing a large value and then it doesn't update. Here's my code for the component:

```auto
<RadzenNumeric ShowUpDown="false" TValue="int?" Min="0" Max="99" @bind-Value=@Value Change=OnChange />

@code {
    [Parameter]
    public int? Value { get; set; }
    [Parameter]
    public EventCallback<int?> ValueChanged { get; set; }

    private void OnChange() { ValueChanged.InvokeAsync(Value); }
}

```

Experimenting with it, I found the Min/Max works if I set the TValue to be a non-nullable int. Any reason why the validation wouldn't work with a nullable int?

Oops, sorry this is a duplicate of [Numeric validation flaw with nullable int](http://forum.radzen.com/t/numeric-validation-flaw-with-nullable-int/9561)
