RadzenNumericRangeValidator not working

I'm having issues trying to get the RadzenNumericRangeValidator running so I did some looking around and found this topic for last year: RadzenNumberRangeValidate Issue - #3 by enchev

However even after basically replicating the code there I'm still unable to get my validator to trigger.

@page "/Test"

@attribute [StreamRendering]

<RadzenTemplateForm Data="@("data")">
    <RadzenNumeric TValue="int" Name="me" ShowUpDown="false" bind-Value="_me"/>
    <RadzenNumericRangeValidator Component="me" Min="10" Max="15" Text="Must be between 10 and 15"/>
    <RadzenButton ButtonType="ButtonType.Submit" Size="ButtonSize.Large" Icon="save" Text="Save"/>
</RadzenTemplateForm>

@code {
    private int _me = 0;
}

No matter what I try, I cannot get my Validator to, well, validate!

Hi @Dazed_And_Confused

Try removing the @attribute [StreamRendering] and replacing with @rendermode RenderMode.InteractiveServer

I don't think there's any page interaction when StreamRendering is used.

Regards

Paul

That's already set site wide.

I added the @attribute [StreamRendering] as a "Hail Mary" but to little effect. I originally tried this on one of my other pages that's got a RadzenDialog full with RadzenGrids and a large number of other controls that are otherwise working a treat.

However your reply (and admittedly a couple of after work beers) got me to thinking again and I was finally able to get the following experiments set up:

@page "/Test"

<RadzenTemplateForm TItem="int" Data="@Me1" >
    <RadzenNumeric Name="me1" ShowUpDown="false" @bind-Value="@Me1"/>
    <RadzenNumericRangeValidator Component="me1" Min="10" Max="15" Text="Must be between 10 and 15"  @oninput=@OnInput />
    <RadzenButton ButtonType="ButtonType.Submit" Size="ButtonSize.Large" Icon="save" Text="Save"/>
</RadzenTemplateForm>

<RadzenTemplateForm TItem="int" Data="@Me2" Submit=@OnSubmit >
    <RadzenNumeric Name="me2" ShowUpDown="false" @bind-Value="@Me2"/>
    <RadzenNumericRangeValidator Component="me2" Min="10" Max="15" Text="Must be between 10 and 15"  @oninput=@OnInput />
    <RadzenButton ButtonType="ButtonType.Submit" Size="ButtonSize.Large" Icon="save" Text="Save"/>
</RadzenTemplateForm>

<RadzenTemplateForm TItem="int" Data="@Me3" InvalidSubmit=@OnInvalidSubmit>
    <RadzenNumeric Name="me3" ShowUpDown="false" @bind-Value="@Me3"/>
    <RadzenNumericRangeValidator Component="me3" Min="10" Max="15" Text="Must be between 10 and 15"  @oninput=@OnInput />
    <RadzenButton ButtonType="ButtonType.Submit" Size="ButtonSize.Large" Icon="save" Text="Save"/>
</RadzenTemplateForm>

<RadzenTemplateForm TItem="int" Data="@Me4" Submit=@OnSubmit InvalidSubmit=@OnInvalidSubmit>
    <RadzenNumeric Name="me4" ShowUpDown="false" @bind-Value="@Me4"/>
    <RadzenNumericRangeValidator Component="me4" Min="10" Max="15" Text="Must be between 10 and 15"  @oninput=@OnInput />
    <RadzenButton ButtonType="ButtonType.Submit" Size="ButtonSize.Large" Icon="save" Text="Save"/>
</RadzenTemplateForm>

@code {

    int Me1 { get; set; }
    int Me2 { get; set; }
    int Me3 { get; set; }
    int Me4 { get; set; }

    private void OnSubmit()
    {

    }

    void OnInput(ChangeEventArgs args)
    {

    }
    void OnInvalidSubmit(FormInvalidSubmitEventArgs args)
    {

    }
}

When I hit the page then I find I have to press the Save 1 and Save 2 buttons twice after entering a value into the RadzenNumeric before the validation kicks in.

However neither the me3 nor me4 perform any form of validation.

In addition I'm unable to replicate the behavior seen in Blazor NumericRangeValidator Component | Free UI Components by Radzen where just tabbing out of the RadzenNumeric seems to be enough to trigger the RdzenNumericRangeValidator

So getting closer, but still very much "Dazed & Confused"...!