在我的ASP.NET MVC应用程序的模型中,我想仅在选中特定复选框时才根据需要验证文本框.
就像是
public bool retired {get, set}; [RequiredIf("retired",true)] public string retirementAge {get, set};
我怎样才能做到这一点?
谢谢.
validation asp.net-mvc annotations model
annotations ×1
asp.net-mvc ×1
model ×1
validation ×1