Fixed: Allow spaces in Trakt username and listname

This commit is contained in:
Qstick 2020-01-18 13:34:49 -05:00 committed by GitHub
parent 2d40914482
commit 5d4ec1272d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -16,13 +16,13 @@ namespace NzbDrone.Core.NetImport.Trakt
// List name required for UserCustomList
RuleFor(c => c.Listname)
.Matches(@"^[A-Za-z0-9\-_]+$", RegexOptions.IgnoreCase)
.Matches(@"^[A-Za-z0-9\-_ ]+$", RegexOptions.IgnoreCase)
.When(c => c.ListType == (int)TraktListType.UserCustomList)
.WithMessage("List name is required when using Custom Trakt Lists");
// Username required for UserWatchedList/UserWatchList
RuleFor(c => c.Username)
.Matches(@"^[A-Za-z0-9\-_]+$", RegexOptions.IgnoreCase)
.Matches(@"^[A-Za-z0-9\-_ ]+$", RegexOptions.IgnoreCase)
.When(c => c.ListType == (int)TraktListType.UserWatchedList || c.ListType == (int)TraktListType.UserWatchList)
.WithMessage("Username is required when using User Trakt Lists");