You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apparently, there is no mention of the [ValidateObjectMembers] attribute (Microsoft.Extensions.Options.ValidateObjectMembersAttribute). Without it and as you already know, validation doesn't propagate recursively to object members which is (in my humble opinion) rather unintuitive. Since nothing warned me about this, I spent hours trying to figure out why validation didn't occur.
I actually didn't find any documentation about it besides at dotnet/runtime#36093 .
The Options pattern page is getting long. How about grouping all option validation-related content to a new Options validation page that would contain:
Type of issue
Missing information
Description
Greetings.
Apparently, there is no mention of the
[ValidateObjectMembers]
attribute (Microsoft.Extensions.Options.ValidateObjectMembersAttribute
). Without it and as you already know, validation doesn't propagate recursively to object members which is (in my humble opinion) rather unintuitive. Since nothing warned me about this, I spent hours trying to figure out why validation didn't occur.I actually didn't find any documentation about it besides at dotnet/runtime#36093 .
Page URL
https://learn.microsoft.com/en-us/dotnet/core/extensions/options
Content source URL
https://github.com/dotnet/docs/blob/main/docs/core/extensions/options.md
Document Version Independent Id
00449cdc-b8fc-a9ff-3f20-0ef0994db354
Platform Id
fa207b6b-9c25-033b-aa53-fead35cb2436
Article author
@IEvangelist
Metadata
Related Issues
The text was updated successfully, but these errors were encountered: