lukeskrz
lukeskrz
I think I just ran into something similar. Here is a simple repro: ``` using System.Text.Json; public class TestOptions { public JsonSerializerOptions JsonSerializerOptions { get; set; } = new(); }...
Using `ValidateDataAnnotations` seems to have no problem with the same options class: ``` services.AddOptions() .BindConfiguration("TestOptions") .ValidateDataAnnotations() .ValidateOnStart(); ```
Assuming I'm not missing something, the model validation seems to work normally: ``` using System.Text.Json; public class TestOptions { public JsonSerializerOptions JsonSerializerOptions { get; set; } = new(); } ......