Exemple #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 RequiredAttribute { ErrorMessage = errorMessage }.ToValidBox();
     return ValidBox.Merge(box, newBox);
 }
Exemple #2
0
 /// <summary>
 /// 验证必须输入
 /// </summary>
 /// <param name="box">验证框</param>         
 /// <returns></returns>
 public static ValidBox Required(this ValidBox box)
 {
     var newBox = new RequiredAttribute().ToValidBox();
     return ValidBox.Merge(box, newBox);
 }