Custom DataAnnotations Validator Derived from RegularExpressionAttribute

前端 未结 2 519
醉酒成梦
醉酒成梦 2021-01-13 02:46

The Gu provides an example of how you might create a custom validator that overrides RegularExpressionAttribute .

The advantage of this is that you don\'t have to cr

2条回答
  •  长发绾君心
    2021-01-13 02:54

    If u wanna a client validation, you should Register a server-side adapter for remote validation.

    See here: http://msdn.microsoft.com/en-us/magazine/ee336030.aspx

    and here: http://bradwilson.typepad.com/blog/2010/01/remote-validation-with-aspnet-mvc-2.html

提交回复
热议问题