I am trying to get client side validation to work on my model -- so far it\'s not working.
My model has a property that\'s a collection:
public class
Try using Editor Templates in your view:
@Html.EditorFor(x => x.newsItems)
and inside ~/Views/Shared/EditorTemplates/NewsItemDetails.cshtml
:
@model AppName.Models.NewsItemDetails
// bunch of stuff
// then:
<div class="editblock">
@Html.TextAreaFor(model => model.newsBody, new { @class = "formtextem", id = editBoxID, rows = "10", style = "width: 54em" })
@Html.ValidationMessageFor(model => model.newsBody)
</div>