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