I have an ASP MVC 4, .Net 4.5 project. I am using the new EmailAddressAttribute validation data annotation attribute on my view models to validate a correct email format is posted.
The attribute is correctly rendered on the input element as <input type="text" ... data-val-email="Email address format is incorrect" .../>.
If I use the kendo validator to validate my form before post to server, the email rule seems to be ignored. I believe I have included all the necessary js files to support unobstrusive validation. All my other data annotation rules are applied correctly.
When I look at kendo.aspnetmvc.min.js, it appears as though the kendo "email" rule is never mapped to the data-val-email rule pattern?
If I write my input element from scratch <input type="email" required .../> obviously my email rule is applied correctly by the kendo validator. This is not an ideal solution though because I am trying to standardise on using the data annotation attributes for my view models.
Can you please tell me if I have done something wrong? I rechecked the 2012 q3 beta and it appears to have the same limitation.
Thanks
The attribute is correctly rendered on the input element as <input type="text" ... data-val-email="Email address format is incorrect" .../>.
If I use the kendo validator to validate my form before post to server, the email rule seems to be ignored. I believe I have included all the necessary js files to support unobstrusive validation. All my other data annotation rules are applied correctly.
When I look at kendo.aspnetmvc.min.js, it appears as though the kendo "email" rule is never mapped to the data-val-email rule pattern?
If I write my input element from scratch <input type="email" required .../> obviously my email rule is applied correctly by the kendo validator. This is not an ideal solution though because I am trying to standardise on using the data annotation attributes for my view models.
Can you please tell me if I have done something wrong? I rechecked the 2012 q3 beta and it appears to have the same limitation.
Thanks