Fixed: removed validation for Nzbget username and password when either is blank

pull/4/head
Mark McDowall 11 years ago
parent cf3659bdef
commit 9c7eaf0043

@ -12,8 +12,8 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
{ {
RuleFor(c => c.Host).NotEmpty(); RuleFor(c => c.Host).NotEmpty();
RuleFor(c => c.Port).GreaterThan(0); RuleFor(c => c.Port).GreaterThan(0);
RuleFor(c => c.Username).NotEmpty(); RuleFor(c => c.Username).NotEmpty().When(c => !String.IsNullOrWhiteSpace(c.Password));
RuleFor(c => c.Password).NotEmpty(); RuleFor(c => c.Password).NotEmpty().When(c => !String.IsNullOrWhiteSpace(c.Username));
} }
} }

Loading…
Cancel
Save