Example #1
0
 /// <summary>
 /// Range.
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="ruleBuilderInitial"></param>
 /// <returns></returns>
 public static IRuleBuilderInitial <T, int> Max <T>(this IRuleBuilderInitial <T, int> ruleBuilderInitial, int max)
 {
     ruleBuilderInitial
     .LessThanOrEqualTo(max)
     .WithMessage("{PropertyName}必须介于小于等于{Max}");
     return(ruleBuilderInitial);
 }