Make client-side and server-side validation rules the same

℡╲_俬逩灬. 提交于 2019-12-04 18:03:43
mattytommo

I would imagine that the built in annotations combined with adding jQuery validation would suit most of your business requirements.

For example, your second one can be achieved using [Required]

For the ones that require something a little extra (like the first scenario you mentioned), you could either take a look at Remote validation or implement your own annotations (but that gets a little trickier when hooking into jQuery validation to add your new annotations).

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