-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Open
Labels
area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing onefeature-model-binding
Milestone
Description
Is your feature request related to a problem? Please describe.
I am trying to do use validation attributes on a record that is also used as a controller model but model binding fails with a rather cryptic error, "'Foo' has validation metadata defined on property 'Bar' that will be ignored. 'Bar' is a parameter in the record primary constructor and validation metadata must be associated with the constructor parameter."
(this has already been reported in issue #30650 but it has since been closed)
Describe the solution you'd like
ASP.NET MVC should allow me to use records that have validation attributes on properties as models.
Metadata
Metadata
Assignees
Labels
area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing onefeature-model-binding