Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question : Blazor DataAnnotation Validation - Localization #3822

Closed
vd3d opened this issue May 4, 2020 · 1 comment
Closed

Question : Blazor DataAnnotation Validation - Localization #3822

vd3d opened this issue May 4, 2020 · 1 comment

Comments

@vd3d
Copy link

vd3d commented May 4, 2020

Hi,

I'm currently using a mix of ABP & Blazor, I use an EditForm with some data annotation and data validation.

The problem is that the error message is english only, is there a way to connect it to th abp localization ?

    public class UserTestModel
    {
        [Required]
        [StringLength(100, ErrorMessage = "The firstname must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
        public string FirstName { get; set; }
    }
@maliming
Copy link
Member

maliming commented May 4, 2020

This requires Blazor to support DataAnnotations localization similar to asp net core.

https://docs.microsoft.com/en-us/aspnet/core/fundamentals/localization?view=aspnetcore-3.1#dataannotations-localization

dotnet/aspnetcore#12158

@maliming maliming closed this as completed May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants