Server side validation with custom DataAnnotationsModelValidatorProvider

烂漫一生 提交于 2019-11-30 15:28:34

I finally figured this out, it's a pretty simple answer. The ApiControllers only respond to the providers in the System.Web.Http.Validation namespace, not the System.Web.Mvc namespace that is used for regular Controllers and the client side validation.

I implemented both to achieve both the client side validation and server validation in the ApiControllers.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!