public ResourceSlugAttribute() { Evaluator = v => Sanitizer.IsSlug((string)v); }
public static IChainableConstraint <IStringConstraints> IsSlug(this IStringConstraints stringConstraints, bool ignoreEmpty = true) { return(stringConstraints.Satisfy(v => (ignoreEmpty && string.IsNullOrEmpty(v)) || Sanitizer.IsSlug(v))); }