Hi i am a beginner in MVC i have written code for validating but it is not working can anyone please help me out. Here is the model code:
[Required]
public string Name { get; set; }
Here is the View code:
@Html.TextBoxFor(m => m.ContactDetailSubSections[i].Name)
@Html.ValidationMessageFor(m=>m.ContactDetailSubSections[i].Name)
Thanks in advance for your help