Ejemplo n.º 1
0
 /// <summary>
 /// 验证必须输入
 /// </summary>
 /// <param name="box">验证框</param>
 /// <param name="errorMessage">提示信息</param>        
 /// <returns></returns>
 public static ValidBox Required(this ValidBox box, string errorMessage)
 {
     var newBox = new RequiredRule { ErrorMessage = errorMessage }.ToValidBox();
     return ValidBox.Merge(box, newBox);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 验证必须输入
 /// </summary>
 /// <param name="box">验证框</param>         
 /// <returns></returns>
 public static ValidBox Required(this ValidBox box)
 {
     var newBox = new RequiredRule().ToValidBox();
     return ValidBox.Merge(box, newBox);
 }