示例#1
0
 /// <summary>
 /// 验证输入是否是Email
 /// </summary>
 /// <param name="box">验证框</param>      
 /// <param name="errorMessage">提示信息</param>
 /// <returns></returns>
 public static ValidBox Email(this ValidBox box, string errorMessage)
 {
     var newBox = new EmailAttribute { ErrorMessage = errorMessage }.ToValidBox();
     return ValidBox.Merge(box, newBox);
 }
示例#2
0
 /// <summary>
 /// 验证输入是否是Email
 /// </summary>
 /// <param name="box">验证框</param>    
 /// <returns></returns>
 public static ValidBox Email(this ValidBox box)
 {
     var newBox = new EmailAttribute().ToValidBox();
     return ValidBox.Merge(box, newBox);
 }