I want to specify the model binder to use for a property of my input model.
public class SendEmailInput
{
[Required, EmailAddress]
public string From { get; set; }
[Required]
public string To { get; set; }
[Required]
public string Subject { get; set; }
[Required, ModelBinder(typeof(RadEditorModelBinder))]
public string Body { get; set; }
}
However the ModelBinderAttribute cannot be applied to properties. This seems stupid since I can apply it to method parameters. What should I do to work around this limitation?