/// <summary> /// 验证输入是URL /// </summary> /// <param name="box">验证框</param> /// <param name="errorMessage">提示信息</param> /// <returns></returns> public static ValidBox Url(this ValidBox box, string errorMessage) { var newBox = new UrlAttribute { ErrorMessage = errorMessage }.ToValidBox(); return ValidBox.Merge(box, newBox); }
/// <summary> /// 验证输入是URL /// </summary> /// <param name="box">验证框</param> /// <returns></returns> public static ValidBox Url(this ValidBox box) { var newBox = new UrlAttribute().ToValidBox(); return ValidBox.Merge(box, newBox); }