Kendo Validator and Valid HTML

3 posts, 1 answers
  1. Richard
    Richard avatar
    7 posts
    Member since:
    Apr 2012

    Posted 12 Jun 2012 Link to this post

    I'm using the validator for a web site that needs to be verifiably valid HTML. However, the validationMessage attribute causes a failure in the following:

    <input type="text" id="Name" class="k-textbox" required validationmessage="Please enter your name" />

    Is there a way to make this control use valid HTML?
  2. Answer
    Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 12 Jun 2012 Link to this post

    Hello,

    You can use the data-required-msg instead of validationMessage. It seems the latter is supported by all browsers that have built-in HTML5 validation support however is not yet part of the HTML5 specification (it is available only as a readonly DOM attribute).

    <input type="text" id="Name" class="k-textbox" required data-required-msg="Please enter your name" />

    Regards,
    Atanas Korchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. Richard
    Richard avatar
    7 posts
    Member since:
    Apr 2012

    Posted 12 Jun 2012 Link to this post

    That did the trick, thanks :)
Back to Top