|
|
|
@ -62,10 +62,10 @@ namespace NzbDrone.Core.Validation
|
|
|
|
|
return ruleBuilder.WithState(v => NzbDroneValidationState.Warning);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static IRuleBuilderOptions<T, string> ContainsProwlarr<T>(this IRuleBuilder<T, string> ruleBuilder)
|
|
|
|
|
public static IRuleBuilderOptions<T, string> StartsOrEndsWithProwlarr<T>(this IRuleBuilder<T, string> ruleBuilder)
|
|
|
|
|
{
|
|
|
|
|
ruleBuilder.SetValidator(new NotEmptyValidator(null));
|
|
|
|
|
return ruleBuilder.SetValidator(new RegularExpressionValidator("prowlarr", RegexOptions.IgnoreCase)).WithMessage("Must contain Prowlarr");
|
|
|
|
|
return ruleBuilder.SetValidator(new RegularExpressionValidator("^Prowlarr|Prowlarr$")).WithMessage("Must start or end with Prowlarr");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|