开发者

Changing modelstate using jquery

I have a jquery function. From that I want to change my ModelState state 开发者_StackOverflow社区property into InValid. Is it possible.


You cannot, this is done on the server side, OR assign a regular expression [DataAnnotation] to that value so you can change it on the client side so the server side thinks its invalid. This is best done in your controller method anyways - as javascript from a validation standpoint can easily be forged.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜