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