Пример #1
0
 /// <summary>
 /// Determines whether [is alpha only] [the specified rule].
 /// </summary>
 /// <param name="rule">The rule.</param>
 /// <param name="value">The value.</param>
 /// <returns><c>true</c> if [is alpha only] [the specified rule]; otherwise, <c>false</c>.</returns>
 private static bool IsAlphaOnly(Rule rule, string value)
 {
     return(string.IsNullOrEmpty(value) || AlphaOnly.IsMatch(value));
 }
Пример #2
0
 /// <summary>
 /// Determines whether [is alpha numeric] [the specified rule].
 /// </summary>
 /// <param name="rule">The rule.</param>
 /// <param name="value">The value.</param>
 /// <returns><c>true</c> if [is alpha numeric] [the specified rule]; otherwise, <c>false</c>.</returns>
 private static bool IsAlphaNumeric(Rule rule, string value)
 {
     return(string.IsNullOrEmpty(value) || Numeric.IsMatch(value));
 }