This is a migrated thread and some comments may be shown as answers.

How do you clear validation messages?

5 Answers 1060 Views
Validation
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 08 Nov 2012, 03:40 PM
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?

5 Answers, 1 is accepted

Sort by
0
Accepted
Alexander Valchev
Telerik team
answered on 13 Nov 2012, 12:36 PM
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!
0
Philipp
Top achievements
Rank 1
answered on 09 Jan 2013, 10:09 AM
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().
0
Alexander Valchev
Telerik team
answered on 11 Jan 2013, 05:09 PM
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!
0
Cindi
Top achievements
Rank 1
answered on 09 Jun 2015, 02:02 PM
How can i do this in angularjs? Please help me...
0
Alexander Valchev
Telerik team
answered on 12 Jun 2015, 08:41 AM
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!
 
Tags
Validation
Asked by
Chris
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Philipp
Top achievements
Rank 1
Cindi
Top achievements
Rank 1
Share this question
or