Fix validation of ChangeColorsRequest
This commit is contained in:
@@ -19,22 +19,22 @@ public sealed class ChangeColorsRequestValidator
|
|||||||
{
|
{
|
||||||
RuleFor(x => x.BannerTop)
|
RuleFor(x => x.BannerTop)
|
||||||
.MinimumLength(4).WithMessage("The minimum value should be in the format #444")
|
.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 #");
|
.Must(x => x.StartsWith('#')).WithMessage("The format should be a valid html color and start with #");
|
||||||
|
|
||||||
RuleFor(x => x.BannerBottom)
|
RuleFor(x => x.BannerBottom)
|
||||||
.MinimumLength(4).WithMessage("The minimum value should be in the format #444")
|
.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 #");
|
.Must(x => x.StartsWith('#')).WithMessage("The format should be a valid html color and start with #");
|
||||||
|
|
||||||
RuleFor(x => x.Accent)
|
RuleFor(x => x.Accent)
|
||||||
.MinimumLength(4).WithMessage("The minimum value should be in the format #444")
|
.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 #");
|
.Must(x => x.StartsWith('#')).WithMessage("The format should be a valid html color and start with #");
|
||||||
|
|
||||||
RuleFor(x => x.Menu)
|
RuleFor(x => x.Menu)
|
||||||
.MinimumLength(4).WithMessage("The minimum value should be in the format #444")
|
.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 #");
|
.Must(x => x.StartsWith('#')).WithMessage("The format should be a valid html color and start with #");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user