From 7cd7ae30805f6ff5e2267ebf027aadd67c79b7de Mon Sep 17 00:00:00 2001 From: Jonathan Bourdon Date: Tue, 6 Aug 2024 02:26:10 -0400 Subject: [PATCH] Fix validation of ChangeColorsRequest --- src/Web/Features/Contents/Handlers/ChangeColors.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Web/Features/Contents/Handlers/ChangeColors.cs b/src/Web/Features/Contents/Handlers/ChangeColors.cs index a7edc06..226b61a 100644 --- a/src/Web/Features/Contents/Handlers/ChangeColors.cs +++ b/src/Web/Features/Contents/Handlers/ChangeColors.cs @@ -19,22 +19,22 @@ public sealed class ChangeColorsRequestValidator { RuleFor(x => x.BannerTop) .MinimumLength(4).WithMessage("The minimum value should be in the format #444") - .MinimumLength(9).WithMessage("The maximum value should be in the format #11223344") + .MaximumLength(9).WithMessage("The maximum value should be in the format #11223344") .Must(x => x.StartsWith('#')).WithMessage("The format should be a valid html color and start with #"); RuleFor(x => x.BannerBottom) .MinimumLength(4).WithMessage("The minimum value should be in the format #444") - .MinimumLength(9).WithMessage("The maximum value should be in the format #11223344") + .MaximumLength(9).WithMessage("The maximum value should be in the format #11223344") .Must(x => x.StartsWith('#')).WithMessage("The format should be a valid html color and start with #"); RuleFor(x => x.Accent) .MinimumLength(4).WithMessage("The minimum value should be in the format #444") - .MinimumLength(9).WithMessage("The maximum value should be in the format #11223344") + .MaximumLength(9).WithMessage("The maximum value should be in the format #11223344") .Must(x => x.StartsWith('#')).WithMessage("The format should be a valid html color and start with #"); RuleFor(x => x.Menu) .MinimumLength(4).WithMessage("The minimum value should be in the format #444") - .MinimumLength(9).WithMessage("The maximum value should be in the format #11223344") + .MaximumLength(9).WithMessage("The maximum value should be in the format #11223344") .Must(x => x.StartsWith('#')).WithMessage("The format should be a valid html color and start with #"); } }