0

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

2

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.