Validation message on checkbox not being removed after checkbox is valid

4 posts, 0 answers
  1. Van
    Van avatar
    4 posts
    Member since:
    Feb 2020

    Posted 06 Aug 2020 Link to this post

    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?

  2. Alex Hajigeorgieva
    Admin
    Alex Hajigeorgieva avatar
    1082 posts

    Posted 10 Aug 2020 Link to this post

    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

  3. Van
    Van avatar
    4 posts
    Member since:
    Feb 2020

    Posted 13 Aug 2020 in reply to Alex Hajigeorgieva Link to this post

    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.
  4. Tsvetomir
    Admin
    Tsvetomir avatar
    796 posts

    Posted 17 Aug 2020 Link to this post

    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

Back to Top