示例#1
0
 private static Expression <Func <string, ValidateResult> > GetErrorExp(int min, int max)
 {
     return(name => ValidateResult.Error($"{name}取值范围是{min}-{max}"));
 }
示例#2
0
 private static Expression <Func <string, ValidateResult> > GetLengMaxErrExp(int maxLength)
 {
     return(name => ValidateResult.Error($"{name}长度不能大于{maxLength}"));
 }