Knockout + mvc 3 + Validation

前端 未结 4 705
自闭症患者
自闭症患者 2020-12-08 04:23

In the controller I would like to be able to get to the client validation rules of the model. I\'ve attached some attributes using data annotations and would like to be able

4条回答
  •  执念已碎
    2020-12-08 04:38

    That's quite a task. You want to be able to convert your C# code into Javascript with respective data type conversions etc. You'll be better off writing down two separate sets of validation at server and client side both. It would be a lot more easier to maintain that than to write your own conversion framework all by yourself and maintaining it

提交回复
热议问题