kendo ui dropdownlist with html5 required attribute

1.5k views Asked by At

I'm using kendo ui dropdownlist component (not the wrapper) in my Asp.net mvc 4 project. We are not using kendo ui validator.

I want to use html5 required attribute for this field. But when I set required attribute, when no value is selected, it does not give any message, also does not submit. But when I use simple (select tag):

<select required="required">
  <option></option>
  ...
</select>

It works; When I not select a value, it does not submit and gives an error message (html5 required attribute).

Is it possible that for kendo ui dropdownlist behaves exactly like normal html select component.

1

There are 1 answers

0
Satya Ranjan Sahoo On

Yes it is possible.

You can add a select event to the kendo dropdown and check if any value is selected or not. If no value is selected you can raise a warning before submitting the form.