I am validating radiobuttonfor with data annotations. making it a required in model. but it's not working. below is my code.
In view.
@Html.RadioButtonFor(m => m.IsMedicalInsurance, true, new { id="rdhaveinsu"}) Yes
@Html.RadioButtonFor(m => m.IsMedicalInsurance, false, new { id="rdhavenoinsu"})No
@Html.ValidationMessageFor(m => m.IsMedicalInsurance)
In Model.
[Required(ErrorMessage="Please update about medical insurance")]
public bool IsMedicalInsurance { set; get; }