MVC下自定义ModelState验证扩展方法

MVC下能够经过对ModelState.IsValid方法进行验证模型,当咱们设计好一个模型而且经过引用this using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; 设置好相应的特性时,Action中经过ModelState.IsValid就能够对此模型进行
相关文章
相关标签/搜索