Skip to content

DataAnnotations Validation messages are incorrect in a trimmed app. #42257

@doyce

Description

@doyce

I'm using DataAnnotationsValidator in my Blazor Webassembly application together with ValidationMessage component. The validated property has a Required attribute applied with no custom validation message. In version 3.2, there was a default validation message appearing, saying that this field is required. After upgrading to .net 5 RC1, the default message was replaced by some kind of placeholder (see image).

obrazek

Note that this behavior occurs only when the application is published as production. When running in development mode in Visual Studio, the default validation message appears correctly.

The default validation message is also broken for other attributes (tested with Range).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions