The model validation attributes MaxLength/MinLength are incompatible with native-aot #58683
Unanswered
sudoudaisuke
asked this question in
Q&A
Replies: 2 comments
-
Hello, |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you for your response. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using
System.ComponentModel.DataAnnotations.MaxLengthAttribute
for request model validation. However, MaxLengthAttribute is incompatible with native-aot (IL2026). How can I validate my model?I found a validation option that supports source generation, but not for asp.net.
dotnet: 8.0
https://github.com/dotnet/runtime/blob/main/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/MaxLengthAttribute.cs#L28
https://learn.microsoft.com/en-us/dotnet/core/extensions/options-validation-generator
Beta Was this translation helpful? Give feedback.
All reactions