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

checkbox validation

5 Answers 561 Views
Validation
This is a migrated thread and some comments may be shown as answers.
frederic
Top achievements
Rank 1
frederic asked on 23 Nov 2015, 09:56 AM

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

5 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 25 Nov 2015, 09:36 AM
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!
 
0
frederic
Top achievements
Rank 1
answered on 11 Dec 2015, 11:10 AM

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

0
Accepted
Daniel
Telerik team
answered on 14 Dec 2015, 08:45 AM
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!
 
0
Ivett
Top achievements
Rank 1
answered on 27 Sep 2016, 03:10 PM

Hi,

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

 

0
Ianko
Telerik team
answered on 30 Sep 2016, 05:39 AM

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.
 
Tags
Validation
Asked by
frederic
Top achievements
Rank 1
Answers by
Daniel
Telerik team
frederic
Top achievements
Rank 1
Ivett
Top achievements
Rank 1
Ianko
Telerik team
Share this question
or