diff --git a/src/Readarr.Api.V1/Config/HostConfigController.cs b/src/Readarr.Api.V1/Config/HostConfigController.cs index 13f19756b..b82efbda8 100644 --- a/src/Readarr.Api.V1/Config/HostConfigController.cs +++ b/src/Readarr.Api.V1/Config/HostConfigController.cs @@ -42,8 +42,10 @@ namespace Readarr.Api.V1.Config SharedValidator.RuleFor(c => c.UrlBase).ValidUrlBase(); SharedValidator.RuleFor(c => c.InstanceName).ContainsReadarr().When(c => c.InstanceName.IsNotNullOrWhiteSpace()); - 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.Username).NotEmpty().When(c => c.AuthenticationMethod == AuthenticationType.Basic || + c.AuthenticationMethod == AuthenticationType.Forms); + SharedValidator.RuleFor(c => c.Password).NotEmpty().When(c => c.AuthenticationMethod == AuthenticationType.Basic || + c.AuthenticationMethod == AuthenticationType.Forms); SharedValidator.RuleFor(c => c.SslPort).ValidPort().When(c => c.EnableSsl); SharedValidator.RuleFor(c => c.SslPort).NotEqual(c => c.Port).When(c => c.EnableSsl);