1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2025-02-26 16:13:19 +00:00

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

This commit is contained in:
Mark McDowall 2014-02-24 08:09:16 -08:00
parent cf3659bdef
commit 9c7eaf0043

View file

@ -12,8 +12,8 @@ public NzbgetSettingsValidator()
{
RuleFor(c => c.Host).NotEmpty();
RuleFor(c => c.Port).GreaterThan(0);
RuleFor(c => c.Username).NotEmpty();
RuleFor(c => c.Password).NotEmpty();
RuleFor(c => c.Username).NotEmpty().When(c => !String.IsNullOrWhiteSpace(c.Password));
RuleFor(c => c.Password).NotEmpty().When(c => !String.IsNullOrWhiteSpace(c.Username));
}
}