checkbox validation

6 posts, 1 answers
  1. frederic
    frederic avatar
    8 posts
    Member since:
    Apr 2015

    Posted 23 Nov 2015 Link to this post

    Hi,

     

    I need to validate that one or more checkboxes have been checked in a group. I read some other relative threads about that in this forum but I can't find my way with the responses. I was thinking it was something close to the way we do with radio-buttons, so I just replaced type=radio with type=checkbox in the following dojo example: http://dojo.telerik.com/uHEto

    It seems that kendo.validate() does not pass on input type=checkbox (except when already checked !) and it appears to be an issue to me.

    Note that I want to make this checkboxes' validation with kendo validator, not on an event like onsubmit for instance.

     

    thank you for your help

  2. Daniel
    Admin
    Daniel avatar
    2118 posts

    Posted 25 Nov 2015 Link to this post

    Hello,

    The validation will not pass because you are using the required attribute which will validate the input on its own. You should use another attribute to determine if the checkbox should be validated in order to avoid triggering the default required validation.


    Regards,
    Daniel
    Telerik
     
    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. frederic
    frederic avatar
    8 posts
    Member since:
    Apr 2015

    Posted 11 Dec 2015 in reply to Daniel Link to this post

    Hi Daniel,

    Thank you for your answer, seems a bit more clear to me, but can you explain why it's working as is with radio buttons ?

     

    Regards,

     

    Laurent

  5. Answer
    Daniel
    Admin
    Daniel avatar
    2118 posts

    Posted 14 Dec 2015 Link to this post

    Hi,

    It will work as it is for radio buttons if the radio buttons value is set. The default required validation has support for validating checkboxes based on their checked state. Radio buttons will be validated as normal inputs based on the value.

    Regards,
    Daniel
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  6. Ivett
    Ivett avatar
    4 posts
    Member since:
    Aug 2016

    Posted 27 Sep Link to this post

    Hi,

    use checkbox in mvc but i need send controller side, somebody knows properties used in  helper the checkbox().

     

  7. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 30 Sep Link to this post

    Hello Yazmin,

     

    I am not exactly sure what you are after. Can you elaborate more on the case and describe better what are the requirements and what you are trying to achieve?

     

    Also, as I can see your question is about checkbox and the thread here is about validation. Therefore, it is suggested to open a new thread regaridng your question with more details, code samples and if it is related to Kendo Validator to describe better how it incorporated with the checkbox you are using. 

     

    Regards,
    Ianko
    Telerik by Progress
     
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
     
Back to Top
Kendo UI is VS 2017 Ready