 ErrorMessage = errorMessage });         }            /// <summary>         /// 验证是否和正则表达式匹配         /// </summary>         /// <typeparam name="T"></typeparam>         /// <param name="fluent"></param>         /// <param name="keySelector">属性选择</param>         /// <param name="pattern">正则表达式</param>         /// <returns></returns>         public static FluentApi<T> Match<T>(this FluentApi<T> fluent, Expression<Func<T, string>> keySelector, string pattern)         {             return fluent.SetRule(keySelector, new MatchAttribute(pattern));         }          /// <summary>         /// 验证是否和正则表达式匹配         /// </summary>         /// <typeparam name="T"></typeparam>         /// <param name="fluent"></param>         /// <param name="keySelector">属性选择</param>         /// <param name="pattern">正则表达式</param>         /// <param name="errorMessage">错误提示信息</param>         /// <returns></returns>         public static FluentApi<T> Match<T>(this FluentApi<T> fluent, Expression<Func<T, string>> keySelector, string pattern, string errorMessage)         {             return fluent.SetRule(keySelector, new MatchAttribute(pattern) { ErrorMessage = errorMessage });         }            /// <summary>         /// 验证不要和目标属性的值一致         /// </summary>         /// <typeparam name="T"></typeparam>         /// <typeparam name="TKey"></typeparam>         /// <typeparam name="TTargetKey"></typeparam>         /// <param name="fluent"></param>         /// <param name="keySelector">属性选择</param>         /// <param name="targetKeySelector">目标属性选择</param>         /// <returns></returns>         public static FluentApi<T> NotEqualTo<T, TKey, TTargetKey>(this FluentApi<T> fluent, Expression<Func<T, TKey>> keySelector, Expression<Func<T, TTargetKey>> targetKeySelector)         {             var propertyName = FluentApiExtend.GetProperty(targetKeySelector).Name;             return fluent.SetRule(keySelector, new NotEqualToAttribute(propertyName));         }          /// <summary>         /// 验证不要和目标属性的值一致         /// </summary>         /// <typeparam name="T"></typeparam>         /// <typeparam name="TKey"></typeparam>         /// <typeparam name="TTargetKey"></typeparam>         /// <param name="fluent"></param>         /// <param name="keySelector">属性选择</param>         /// <param name="targetKeySelector">目标属性选择</param>         /// <param name="errorMessage">错误提示信息</param>         /// <returns></returns>         public static FluentApi<T> NotEqualTo<T, TKey, TTargetKey>(this FluentApi<T> fluent, Expression<Func<T, TKey>> keySelector, Expression<Func<T, TTargetKey>> targetKeySelector, string errorMessage)         {             var propertyName = FluentApiExtend.GetProperty(targetKeySelector).Name;             return fluent.SetRule(keySelector, new NotEqualToAttribute(propertyName) { ErrorMessage = errorMessage });         }            /// <summary>         /// 表示验证不要和正则表达式匹配         /// </summary>         /// <typeparam name="T"></typeparam>         /// <param name="fluent"></param>         /// <param name="keySelector">属性选择</param>         /// <param name="pattern">正则表达式</param>         /// <returns></returns>         public static FluentApi<T> NotMatch<T>(this FluentApi<T> fluent, Expression<Func<T, string>> keySelector, string pattern)         {             return fluent.SetRule(keySelector, new NotMatchAttribute(pattern));         }          /// <summary>         /// 表示验证不要和正则表达式匹配         /// </summary>         /// <typeparam name="T"></typeparam>         /// <param name="fluent"></param>         /// <param name="keySelector">属性选择</param>         /// <param name="pattern">正则表达式</param>         /// <param name="errorMessage">错误提示信息</param>         /// <returns></returns>         public static FluentApi<T> NotMatch<T>(this FluentApi<T> fluent, Expression<Func<T, string>> keySelector, string pattern, string errorMessage)         {             return fluent.SetRule(keySelector, new NotMatchAttribute(pattern) { ErrorMessage = errorMessage });         }            /// <summary>         /// 表示精度验证         /// </summary>         /// <typeparam name="T"></typeparam>         /// <typeparam name="TKey"></typeparam>         /// <param name="fluent"></param>         /// <param name="keySelector">属性选择</param>         /// <param name="min">最小精度</param>         /// <param name="max">最大精度</param>         /// <returns></returns>         public static FluentApi<T> Precision<T, TKey>(this FluentApi<T> fluent, Expression<Func<T, TKey>> keySelector, int min, int max)         {             return fluent.SetRule(keySelector, new PrecisionAttribute(min, max));         }           /// <summary>         /// 表示精度验证         /// </summary>         /// <typeparam name="T"></typeparam>         /// <typeparam name="TKey"></typeparam>         /// <param name="fluent"></param>         /// <param name="keySelector">属性选择</param>         /// <param name="min">最小精度</param>         /// <param name="max">最大精度</param>         /// <param name="errorMessage">错误提示信息</param>         /// <returns></returns>         public static FluentApi<T> Precision<T, TKey>(this FluentApi<T> fluent, Expression<Func<T, TKey>> keySelector, int min, int max, string errorMessage)         {             return fluent.SetRule(keySelector, new PrecisionAttribute(min, max) { ErrorMessage = errorMessage });         }             /// <summary>         /// 表示验值要在一定的区间中         /// </summary>         /// <typeparam name="T"></typeparam>         /// <typeparam name="TKey"></typeparam>         /// <param name="fluent"></param>         /// <param name="keySelector">属性选择</param>         /// <param name="minValue">最小值</param>         /// <param name="maxValue">最大值</param>         /// <returns></returns>         public static FluentApi<T> Range<T, TKey>(this FluentApi<T> fluent, Expression<Func<T, TKey>> keySelector, int minValue, int maxValue)         {             return fluent.SetRule(keySelector, new RangeAttribute(minValue, maxValue));         }          /// <summary>         /// 表示验值要在一定的区间中         /// </summary>         /// <typeparam name="T"></typeparam>         /// <typeparam name="TKey"></typeparam>         /// <param name="fluent"></param>         /// <param name="keySelector">属性选择</param>         /// <param name="minValue">最小值</param>         /// <param name="maxValue">最大值</param>         /// <returns></returns>         public static FluentApi<T> Range<T, TKey>(this FluentApi<T> fluent, Expression<Func<T, TKey>> keySelector, double minValue, double maxValue)         {             return fluent.SetRule(keySelector, new RangeAttribute(minValue, maxValue));         }          /// <summary>         /// 表示验值要在一定的区间中         /// </summary>         /// <typeparam name="T"></typeparam>         /// <typeparam name="TKey"></typeparam>         /// <param name="fluent"></param>         /// <param name="keySelector">属性选择</param>         /// <param name="minValue">最小值</param>         /// <param name="maxValue">最大值</param>         /// <param name="errorMessage">错误提示信息</param>         /// <returns></returns>         public static FluentApi<T> Range<T, TKey>(this FluentApi<T> fluent, Expression<Func<T, TKey>> keySelector, int minValue, int maxValue, string errorMessage)         {             return fluent.SetRule(keySelector, new RangeAttribute(minValue, maxValue) { ErrorMessage = errorMessage });         }          /// <summary>         /// 表示验值要在一定的区间中         /// </summary>         /// <typeparam name="T"></typeparam>         /// <typeparam name="TKey"></typeparam>         /// <param name="fluent"></param>         /// <param name="keySelector">属性选择</param>         /// <param name="minValue">最小值</param>         /// <param name="maxValue">最大值</param>         /// <param name="errorMessage">错误提示信息</param>         /// <returns></returns>         public static FluentApi<T> Range<T, TKey>(this FluentApi<T> fluent, Expression<Func<T, TKey>> keySelector, double minValue, double maxValue, string errorMessage)         {             return fluent.SetRule(keySelector, new RangeAttribute(minValue, maxValue) { ErrorMessage = errorMessage });         }           /// <summary>         /// 表示验证是网络地址         /// </summary>         /// <typeparam name="T"></typeparam>         /// <param name="fluent"></param>         /// <param name="keySelector">属性选择</param>         /// <returns></returns>         public static FluentApi<T> Url<T>(this FluentApi<T> fluent, Expression<Func<T, string>> keySelector)         {             return fluent.SetRule(keySelector, new UrlAttribute());         }          /// <summary>         /// 表示验证是网络地址         /// </summary>         /// <typeparam name="T"></typeparam>         /// <param name="fluent"></param>         /// <param name="keySelector">属性选择</param>         /// <param name="errorMessage">错误提示信息</param>         /// <returns></returns>         public static FluentApi<T> Url<T>(this FluentApi<T> fluent, Expression<Func<T, string>> keySelector, string errorMessage)         {             return fluent.SetRule(keySelector, new UrlAttribute() { ErrorMessage = errorMessage });         }     