-
Notifications
You must be signed in to change notification settings - Fork 120
[feature/10.0][WIP] Use options validation source generator #8254
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
base: feature/10.0
Are you sure you want to change the base?
Conversation
- Use generated validators for recursive validation - Pass along service provider through validation context
ValidationContext itemContext = new(item, validationContext, validationContext.Items); | ||
itemContext.MemberName = validationContext.MemberName + "[" + index.ToString() + "]"; | ||
|
||
Validator.TryValidateObject(item, itemContext, results); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was the call we need to remove
Because they rely on .NET10+ ValidationContext ctor
The 'no-recent-activity' label has been added to this pull request due to four weeks without any activity. If there is no activity in the next six weeks, this pull request will automatically be closed. You can learn more about our stale PR policy here: https://github.com/dotnet/dotnet-monitor/blob/main/CONTRIBUTING.md#stale-pr-policy |
For now this checks in the generated code with fixes for dotnet/runtime#115347.