BEST
DEALS
OF THE
YEAR!
SAVE UP TO $3,000
24 NOV
1 DEC
00 Days
00 Hrs
00 Min
00 Sec
Open Closed

Blazor client side validation without Blazorise #1874


User avatar
0
stjepanh_teched created
  • ABP Framework version: v4.4.2.
  • UI type: Blazor
  • DB provider: EF Core

Hello, we are trying to localize the deafult messages from data annotation validation attributes on the client side. Using Blazorise validation works, but we've opted to use Blazor form elements. Is it possible to make localization work in that context? Basic example:

Component.razor:

        <EditForm Model="model" OnValidSubmit="SubmitAsync">
            <DataAnnotationsValidator />
            <InputText id="name" @bind-Value="model.Test" />
            <ValidationMessage For="() => model.Test" />
            <Button Type="ButtonType.Submit">Button</Button>
        </EditForm>

Model DTO:

    public class TestDto
    {
        [Required(ErrorMessage = "Required1"]
        public string Test { get; set; }
    }

We've added key-value pair in en.json: "Required1": "test test {0}"

This is the result: Any help?

Thank you in advance


1 Answer(s)
  • User Avatar
    -1
    liangshiwei created
    Fullstack Developer

    Hi,

    This is a feature of blazorise, you should keep use blazorise element.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on November 20, 2025, 09:12
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.