Maharudra Gadekar

Maharudra Gadekar

  • 1.4k
  • 367
  • 82.1k

how to apply validation in html radio button control?

Nov 18 2016 12:37 AM
Hi,
I am using HTML 5 control in mvc view but i dont no how to set the required field validation....show below code....
 
<input type="radio"  name="payment" value="C" @( this.Model.paymode == "C" ? "Checked" : "") />
<input type="radio"  name="payment" value="O" @( this.Model.paymode == "O" ? "Checked" : "") />
 
 @html.validationmessagefor(x=>x.paymode)
 
I am using code but not done. how to set validation of that control. Please help me.
 
thanks in advance

Answers (1)