|
|
@ -40,7 +40,7 @@ namespace Prowlarr.Api.V1.Config
|
|
|
|
SharedValidator.RuleFor(c => c.Port).ValidPort();
|
|
|
|
SharedValidator.RuleFor(c => c.Port).ValidPort();
|
|
|
|
|
|
|
|
|
|
|
|
SharedValidator.RuleFor(c => c.UrlBase).ValidUrlBase();
|
|
|
|
SharedValidator.RuleFor(c => c.UrlBase).ValidUrlBase();
|
|
|
|
SharedValidator.RuleFor(c => c.InstanceName).ContainsProwlarr().When(c => c.InstanceName.IsNotNullOrWhiteSpace());
|
|
|
|
SharedValidator.RuleFor(c => c.InstanceName).StartsOrEndsWithProwlarr();
|
|
|
|
|
|
|
|
|
|
|
|
SharedValidator.RuleFor(c => c.Username).NotEmpty().When(c => c.AuthenticationMethod != AuthenticationType.None);
|
|
|
|
SharedValidator.RuleFor(c => c.Username).NotEmpty().When(c => c.AuthenticationMethod != AuthenticationType.None);
|
|
|
|
SharedValidator.RuleFor(c => c.Password).NotEmpty().When(c => c.AuthenticationMethod != AuthenticationType.None);
|
|
|
|
SharedValidator.RuleFor(c => c.Password).NotEmpty().When(c => c.AuthenticationMethod != AuthenticationType.None);
|
|
|
|