New: Set Instance Name

This commit is contained in:
Robin Dadswell 2022-05-12 17:10:10 +01:00 committed by Qstick
parent 26b9b7665a
commit 1553a8f37b
6 changed files with 31 additions and 0 deletions

View file

@ -40,6 +40,7 @@ namespace Lidarr.Api.V1.Config
SharedValidator.RuleFor(c => c.Port).ValidPort();
SharedValidator.RuleFor(c => c.UrlBase).ValidUrlBase();
SharedValidator.RuleFor(c => c.InstanceName).ContainsLidarr().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);