예제 #1
0
 public static IChainableConstraint <IStringConstraints> IsSlug(this IStringConstraints stringConstraints, bool ignoreEmpty = true)
 {
     return(stringConstraints.Satisfy(v => (ignoreEmpty && string.IsNullOrEmpty(v)) || Sanitizer.IsSlug(v)));
 }
예제 #2
0
 public static IChainableConstraint <IStringConstraints> IsSlug(this IStringConstraints constraints, bool ignoreEmpty = true)
 {
     return(constraints.Satisfy(v => (ignoreEmpty && string.IsNullOrEmpty(v)) || PatternValidator.IsValidSlug(v)));
 }
예제 #3
0
 public static IChainableConstraint <IStringConstraints> IsDateTimeZoneId(this IStringConstraints stringConstraints, bool ignoreEmpty = true)
 {
     return(stringConstraints.Satisfy(v => (ignoreEmpty && string.IsNullOrEmpty(v)) || CommonHelper.IsValidTimeZoneId(v)));
 }