diff --git a/src/NzbDrone.Core/ImportLists/TMDb/Person/TMDbPersonSettings.cs b/src/NzbDrone.Core/ImportLists/TMDb/Person/TMDbPersonSettings.cs index ade0a14212..de2df5933b 100644 --- a/src/NzbDrone.Core/ImportLists/TMDb/Person/TMDbPersonSettings.cs +++ b/src/NzbDrone.Core/ImportLists/TMDb/Person/TMDbPersonSettings.cs @@ -1,4 +1,4 @@ -using System.Text.RegularExpressions; +using System.Text.RegularExpressions; using FluentValidation; using NzbDrone.Core.Annotations; @@ -10,6 +10,27 @@ public TMDbPersonSettingsValidator() : base() { RuleFor(c => c.PersonId).Matches(@"^[1-9][0-9]*$", RegexOptions.IgnoreCase); + + RuleFor(c => c.PersonCast) + .Equal(true) + .Unless(c => c.PersonCastDirector || c.PersonCastProducer || c.PersonCastSound || c.PersonCastWriting) + .WithMessage("Must Select One Credit Type Option"); + RuleFor(c => c.PersonCastDirector) + .Equal(true) + .Unless(c => c.PersonCast || c.PersonCastProducer || c.PersonCastSound || c.PersonCastWriting) + .WithMessage("Must Select One Credit Type Option"); + RuleFor(c => c.PersonCastProducer) + .Equal(true) + .Unless(c => c.PersonCastDirector || c.PersonCast || c.PersonCastSound || c.PersonCastWriting) + .WithMessage("Must Select One Credit Type Option"); + RuleFor(c => c.PersonCastSound) + .Equal(true) + .Unless(c => c.PersonCastDirector || c.PersonCastProducer || c.PersonCast || c.PersonCastWriting) + .WithMessage("Must Select One Credit Type Option"); + RuleFor(c => c.PersonCastWriting) + .Equal(true) + .Unless(c => c.PersonCastDirector || c.PersonCastProducer || c.PersonCastSound || c.PersonCast) + .WithMessage("Must Select One Credit Type Option"); } }