Client side validation not working with Ajax

2 posts, 0 answers
  1. Mattias
    Mattias avatar
    263 posts
    Member since:
    Aug 2012

    Posted 25 Apr 2013 Link to this post

    I have property i my viewmodel: Email with attribute: [Email(ErrorMessage = "not a valid email address")]
    The attribute comes from DataAnnotationsExtensions.
    The client error message shows up when using Server side binding but not when using Ajax.

    How do I enable client side validation when using Ajax?

  2. Daniel
    Daniel avatar
    2231 posts

    Posted 29 Apr 2013 Link to this post

    Hello Mattias,

    I posted my reply in the support ticket with the same question. For convenience I am pasting it below:

    The email unobtrusive validation is not supported because it is not added by default. In order to validate the email on the client, you should either use the RegularExpressionAttribute or extend the Kendo Validator as demonstrated in the custom validation demo in the examples project. 

    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top