I have this viewmodel:
public class Letter
{
public strng Name{get;set;}
[UIHint("UserSelector")]
[Required]
public List<int> Users{get;set;}
}
For rendering Letter viewmodel I use Html.EditorForModel(). EditorTemplate "UserSelector" is complex view and looks like this:
Before submitting the form I manually generate hidden field controls for selected users and it's obviously RequiredAttribute doesn't work for Users property. What's "true" way to force UserSelector view to "understand" RequiredAttribute?