public SonarrConfigurationValidator(
     ISonarrValidationMessages messages,
     IValidator <ReleaseProfileConfig> releaseProfileConfigValidator)
 {
     RuleFor(x => x.BaseUrl).NotEmpty().WithMessage(messages.BaseUrl);
     RuleFor(x => x.ApiKey).NotEmpty().WithMessage(messages.ApiKey);
     RuleForEach(x => x.ReleaseProfiles).SetValidator(releaseProfileConfigValidator);
 }
 public ReleaseProfileConfigValidator(ISonarrValidationMessages messages)
 {
     RuleFor(x => x.TrashIds).NotEmpty().WithMessage(messages.ReleaseProfileTrashIds);
 }
Ejemplo n.º 3
0
 public ReleaseProfileConfigValidator(ISonarrValidationMessages messages)
 {
     RuleFor(x => x.Type).IsInEnum().WithMessage(messages.ReleaseProfileType);
 }