Closed koenigst closed 11 months ago
Tagging subscribers to this area: @dotnet/area-system-componentmodel-dataannotations See info in area-owners.md if you want to be subscribed.
Author: | koenigst |
---|---|
Assignees: | - |
Labels: | `area-System.ComponentModel.DataAnnotations` |
Milestone: | - |
Tagging subscribers to this area: @dotnet/area-extensions-options See info in area-owners.md if you want to be subscribed.
Author: | koenigst |
---|---|
Assignees: | - |
Labels: | `area-Extensions-Options`, `in-pr`, `source-generator` |
Milestone: | 9.0.0 |
Description
When a class is marked with the
OptionsValidatorAttribute
implementsIValidatableObject
theOptionsValidatorGenerator
does not generate aValidate
method if no properties are marked with validation attributes.Reproduction Steps
Expected behavior
The generator generates a
Validate
method calling theIValidatableObject.Validate
method.Actual behavior
The sample does not compile due to the missing
Validate
method.Regression?
No response
Known Workarounds
No response
Configuration
Microsoft.Extensions.Options
: 8.0.0Other information
No response