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

Validation message on checkbox not being removed after checkbox is valid

3 Answers 458 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Van
Top achievements
Rank 1
Van asked on 06 Aug 2020, 06:24 PM

Hi,

I'm using popup editing mode for my grid model and there is one checkbox which is required. I'm encountering an issue that the checkbox doesn't seem to be validated on blur. After I checked the box, the validation message is not getting removed. Other text fields and drop down fields are working fine. How would I resolve this issue?

3 Answers, 1 is accepted

Sort by
0
Alex Hajigeorgieva
Telerik team
answered on 10 Aug 2020, 12:25 PM

Hello, Van,

I tested with a checkbox in one of our editable grids by adding a required validation and that seems to work as prescribed. Can you take a look at this Dojo and let me know in case you see any differences with your implementation:

https://dojo.telerik.com/@bubblemaster/ErADeJUW

Look forward to hearing back from you.

Kind Regards,
Alex Hajigeorgieva
Progress Telerik

0
Van
Top achievements
Rank 1
answered on 13 Aug 2020, 12:52 PM
Thank you for your input! I eventually found out the issue when looking at the value attribute of <input />. It was empty originally (value="") instead of true or false. That is because the default value of the checkbox is set to empty string.
0
Tsvetomir
Telerik team
answered on 17 Aug 2020, 01:04 PM

Hi Van,

I am glad to hear that you have managed to resolve the issue on your own! Indeed, having the input elements with a value different than a boolean might cause unexpected behavior. This is due to the fact that the validator checks the type and value simultaneously.

If you encounter any other obstacles, do let me know. I will be happy to assist.

 

Kind regards,
Tsvetomir
Progress Telerik

Tags
Grid
Asked by
Van
Top achievements
Rank 1
Answers by
Alex Hajigeorgieva
Telerik team
Van
Top achievements
Rank 1
Tsvetomir
Telerik team
Share this question
or