Skip to content

Minimal API validation does not work with record struct #64513

@marcominerva

Description

@marcominerva

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

The built-in validation provided by AddValidation does not take into account record struct.

It could be related to this check?

private static bool IsClass(Type type)

Steps To Reproduce

Minimal repo at https://github.com/lkurzyniec/dotnet10-validation/

.NET Version

10.0.100

Metadata

Metadata

Assignees

Labels

area-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etc

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions