I m 在MVC 3中确定一个有数据说明的领域:
[StringLength(50, MinimumLength=5)]
public string MyText { get; set; }
是否有办法提供动态价值? 与此类似:
[StringLength(50, MinimumLength=GetMinimumLengthValueFromDb())]
public string MyText { get; set; }
My last resort is to use remote validator. If I won t find a way to do this with StringLength
, I will use RemoteValidator
.