How do you clear validation messages?

6 posts, 1 answers
  1. Chris
    Chris avatar
    22 posts
    Member since:
    Jun 2011

    Posted 08 Nov 2012 Link to this post

    How can I clear the validation messages? (reset this part of the form).

    Also more importantly, how can I test if fields are valid, without displaying the messages?
  2. Answer
    Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 13 Nov 2012 Link to this post

    Hi Chris,

    You can clear the validation messages using a very simple jQuery selector:
    $("#< validatorElement > span.k-tooltip-validation").hide();

    Regarding your second question, I am afraid that this is not supported out of the box. The easiest solution would be to call the validate method and hide the messages immediately after that. Alternatively you can use the _checkValidity method but please have in mind that this method is intended for internal usage. The method accepts a jQuery selector (input element) and returns an object containing boolean property called "valid".

    Regards,
    Alexander Valchev
    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. Philipp
    Philipp avatar
    2 posts
    Member since:
    Sep 2012

    Posted 09 Jan 2013 Link to this post

    You can clear the validation messages using a very simple jQuery selector:
    $("#< validatorElement > span.k-tooltip-validation").hide();

    would be great to have a method for that - something like reset().
  5. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 11 Jan 2013 Link to this post

    Hi Philipp,

    Thank you for the feedback. I would suggest you to vote for this feature request here. If more people vote for it and it gains popularity we will consider adding it to the suite.

    Kind regards,
    Alexander Valchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  6. KG
    KG avatar
    2 posts
    Member since:
    Oct 2014

    Posted 09 Jun 2015 in reply to Philipp Link to this post

    How can i do this in angularjs? Please help me...
  7. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 12 Jun 2015 Link to this post

    Hi KG,

    This thread is from 2013. Now there is hideMessages method that you may use to hide the messages.

    Regards,
    Alexander Valchev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready