Require SEO fields for published blogs
TaxBaik CI/CD / build-and-deploy (push) Successful in 56s

This commit is contained in:
2026-07-09 15:59:34 +09:00
parent 7ca47e792b
commit 1441d6b306
+6 -2
View File
@@ -10,8 +10,12 @@ public sealed class CreateBlogPostDtoValidator : AbstractValidator<CreateBlogPos
RuleFor(x => x.Content).NotEmpty().MinimumLength(ValidationRules.MessageMinLength).MaximumLength(ValidationRules.ContentMaxLength);
RuleFor(x => x.CategoryId).GreaterThan(0);
RuleFor(x => x.Tags).MaximumLength(ValidationRules.TagsMaxLength);
RuleFor(x => x.SeoTitle).MaximumLength(ValidationRules.SeoTitleMaxLength);
RuleFor(x => x.SeoDescription).MaximumLength(ValidationRules.SeoDescriptionMaxLength);
RuleFor(x => x.SeoTitle)
.NotEmpty().When(x => x.IsPublished)
.MaximumLength(ValidationRules.SeoTitleMaxLength);
RuleFor(x => x.SeoDescription)
.NotEmpty().When(x => x.IsPublished)
.MaximumLength(ValidationRules.SeoDescriptionMaxLength);
}
}