❔ ModelState.IsValid
do I need to call this explicitly myself or does the framework call this when using webAPI?
I would assume that its called automatically but its still possible for the JSON to end up de-serialized but still not be valid?
3 Replies
controllers marked with
[ApiController]
automatically check this and return a bad requestthank you! that clears it up
that explains this type of response then:
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.