mirror of
https://github.com/Readarr/Readarr
synced 2026-02-12 17:53:26 +01:00
Add validation for MinPopularity and MinPages in metadata profiles
This commit is contained in:
parent
f341b5f449
commit
484c255fd4
1 changed files with 6 additions and 1 deletions
|
|
@ -18,7 +18,12 @@ public class MetadataProfileController : RestController<MetadataProfileResource>
|
|||
public MetadataProfileController(IMetadataProfileService profileService)
|
||||
{
|
||||
_profileService = profileService;
|
||||
SharedValidator.RuleFor(c => c.Name).NotEqual("None").WithMessage("'None' is a reserved profile name").NotEmpty();
|
||||
|
||||
SharedValidator.RuleFor(c => c.Name)
|
||||
.NotEqual("None").WithMessage("'None' is a reserved profile name")
|
||||
.NotEmpty();
|
||||
SharedValidator.RuleFor(c => c.MinPopularity).GreaterThanOrEqualTo(0);
|
||||
SharedValidator.RuleFor(c => c.MinPages).GreaterThanOrEqualTo(0);
|
||||
SharedValidator.RuleFor(c => c.AllowedLanguages)
|
||||
.Must(x => x
|
||||
.Trim(',')
|
||||
|
|
|
|||
Loading…
Reference in a new issue