diff --git a/services/Directory/FilterLists.Directory.Application/Commands/CreateList.cs b/services/Directory/FilterLists.Directory.Application/Commands/CreateList.cs index 38d453195..fc479ef87 100644 --- a/services/Directory/FilterLists.Directory.Application/Commands/CreateList.cs +++ b/services/Directory/FilterLists.Directory.Application/Commands/CreateList.cs @@ -197,7 +197,13 @@ public Validator(IValidator entityIdValidator, IValidator urlValida .OverridePropertyName(nameof(Command.TagIds)); RuleForEach(c => c.ViewUrls.Select(u => u.Url)) .SetValidator(urlValidator) - .OverridePropertyName(nameof(Command.ViewUrls)); + .OverridePropertyName(nameof(Command.ViewUrls) + "." + nameof(FilterListViewUrl.Url)); + RuleForEach(c => c.ViewUrls.Select(u => u.SegmentNumber)) + .GreaterThan((short)0) + .OverridePropertyName(nameof(Command.ViewUrls) + "." + nameof(FilterListViewUrl.SegmentNumber)); + RuleForEach(c => c.ViewUrls.Select(u => u.Primariness)) + .GreaterThan((short)0) + .OverridePropertyName(nameof(Command.ViewUrls) + "." + nameof(FilterListViewUrl.Primariness)); RuleFor(c => c.HomeUrl) .SetValidator(urlValidator); RuleFor(c => c.OnionUrl)