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
The new validation system from MinimalAPIs support recursive validation of objects.
It was said in #28640 (comment) by @danroth27:
Our preference is that the object graph validation logic is a generic component that ships as part of the core .NET libraries instead of as an ASP.NET Core specific component. This logic could then be used for minimal APIs, Blazor, and anyone else that needs it.
Now with the RC, I can't seem to find an easy way to use the new system. Judging by some source code, the [ValidatableType] attribute only gets considered in the context of endpoints, but not when used on arbitrary objects.
So is there any way so make use of the new validation for custom objects within e.g. my own services?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
The new validation system from MinimalAPIs support recursive validation of objects.
It was said in #28640 (comment) by @danroth27:
Now with the RC, I can't seem to find an easy way to use the new system. Judging by some source code, the [ValidatableType] attribute only gets considered in the context of endpoints, but not when used on arbitrary objects.
So is there any way so make use of the new validation for custom objects within e.g. my own services?
Beta Was this translation helpful? Give feedback.
All reactions