I have a problem on how to change the input class of the CheckBox when the Dropdown List data changed.
This is my html markup :
<p>
<label for="ddlContType">
Contact Type</label>
<span>
@Html.DropDownList("ddlContType", new SelectList(ViewBag.ContTypeList, "ID", "Display_Value",ContType), "[Please Select]",
new Dictionary<string, object>
{
{"class","validate[required] inputLong"}
})
</span>
</p>
<p>
<label for="txtContValue">
Contact Value</label>
<span>
<input type="text" id="txtContValue" name="txtContValue" class="validate[required] inputLong"
value="" />`
Because I have used the validate of jquery
I have Email and Phone Number on my DropDownList
I want to validate when I select the Email in my Dropdown List , it will allow an Email Format Text box and When I select the Phone number on my Dropdown..
It will only allow Phone Format This is the class I am using
class="validate[required,custom[email]]
and
class="validate[required,custom[phone]]