0
votes

NET Core 3.1 etc, Blazor Server

I have a table with few rows. Input field for percentage has DataAnnotations [Range(1,100)]; It is work correct if I inserted value and changed focus on another place, click on another input field. But if to insert 7000 and press Enter button, starts work validation and for short time arise error message, but after on UI something magic rewrite and current input field marks as correct. For the input field I use Blazor InputNumber.

enter image description here

Can somebody help me to resolve this issue?

With best wishes

1
@aguafrommars Thank you! This article help me to solve another one issue, but current issue is still can reproduce - AleksandrBr

1 Answers

0
votes

For validation I used https://blazor-university.com/forms/writing-custom-validation/ FluentValidationValidator

Press Enter means submit form. For form validation I used one Validator2 and InputNumber is part of other Validator2. Validator2 shows for short time Error, but Validator2 as main validator for whole form didnt find errors and rewrites error message and css ....

If it helped someone, please give me to know just for statistic.