In a model of my ASP.NET MVC application I would like validate a textbox as required only if a specific checkbox is checked.
Something like
public bo
Try my custom validation attribute:
[ConditionalRequired("retired==true")] public string retirementAge {get, set};
It supports multiple conditions.