mirror of
https://github.com/Radarr/Radarr
synced 2025-12-21 15:56:23 +01:00
parent
f120b84c43
commit
74c89e1d44
1 changed files with 22 additions and 1 deletions
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue