From ac2b9516e1493d5de0db06b404477478a842a0fe Mon Sep 17 00:00:00 2001 From: Sean Godsell Date: Wed, 1 Apr 2020 00:10:37 +0100 Subject: [PATCH] Fixed: Made Username required for UserCustomList (#4255) --- src/NzbDrone.Core/NetImport/Trakt/TraktSettings.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/NzbDrone.Core/NetImport/Trakt/TraktSettings.cs b/src/NzbDrone.Core/NetImport/Trakt/TraktSettings.cs index 4f4030b03..1af7335e4 100644 --- a/src/NzbDrone.Core/NetImport/Trakt/TraktSettings.cs +++ b/src/NzbDrone.Core/NetImport/Trakt/TraktSettings.cs @@ -1,4 +1,4 @@ -using FluentValidation; +using FluentValidation; using NzbDrone.Common.Extensions; using NzbDrone.Core.Annotations; using NzbDrone.Core.ThingiProvider; @@ -20,10 +20,10 @@ namespace NzbDrone.Core.NetImport.Trakt .When(c => c.ListType == (int)TraktListType.UserCustomList) .WithMessage("List name is required when using Custom Trakt Lists"); - // Username required for UserWatchedList/UserWatchList + // Username required for UserWatchedList/UserWatchList/UserCustomList RuleFor(c => c.Username) .Matches(@"^[A-Za-z0-9\-_ ]+$", RegexOptions.IgnoreCase) - .When(c => c.ListType == (int)TraktListType.UserWatchedList || c.ListType == (int)TraktListType.UserWatchList) + .When(c => c.ListType == (int)TraktListType.UserWatchedList || c.ListType == (int)TraktListType.UserWatchList || c.ListType == (int)TraktListType.UserCustomList) .WithMessage("Username is required when using User Trakt Lists"); // Loose validation @TODO