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

    Hi,
    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?

    Regards,
    Mattias
  2. Daniel
    Admin
    Daniel avatar
    2219 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. 

    Regards,
    Daniel
    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