This is a migrated thread and some comments may be shown as answers.
option required
1 Answer 5 Views
This is a migrated thread and some comments may be shown as answers.
Hector Hernandez
Top achievements
Rank 2
Hector Hernandez asked on 08 Oct 2015, 05:52 AM

I have some asp text box in each of one i use a property call required like this 

1.<asp:TextBox runat="server" ID="TxtCorreoVal" CssClass="form-control" required>

and in the css i use this, i upload an image of how it looks in a normal textbox i want use the same functionality on RadDatePicker and RadComboBox

how can i do this

01.input:required:invalid, input:focus:invalid {
02.    background-image: url(../imagenes/required.png);
03.    background-position: right top;
04.    background-repeat: no-repeat;
05.    -moz-box-shadow: none;
06.  }
07.  input:required:valid {
08.    background-image: url(../imagenes/Ok.png);
09.    background-position: right top;
10.    background-repeat: no-repeat;
11.  }

 ​

 Thank for your time

 

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 12 Oct 2015, 02:27 PM
Hello Hector,

The TextBox is a simple control that renders one single INPUT element, which is the reason that you are able to use the required attribute on it. However, with RadDatePicker and RadComboBox this will not be possible and you have to use RequiredFieldValidator or CustomValidator controls for your validation.

In the following online demo you will find an example for validating RadDatePicker and RadComboBox controls:
Hope this helps.


Regards,
Konstantin Dikov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Asked by
Hector Hernandez
Top achievements
Rank 2
Answers by
Konstantin Dikov
Telerik team
Share this question
or