Ensure Custom Format Maximum Size won't overflow

This commit is contained in:
Stevie Robinson 2025-05-22 02:52:16 +02:00 committed by GitHub
parent 70165bddc8
commit a50d256264
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,6 +11,7 @@ public SizeSpecificationValidator()
{
RuleFor(c => c.Min).GreaterThanOrEqualTo(0);
RuleFor(c => c.Max).GreaterThan(c => c.Min);
RuleFor(c => c.Max).LessThanOrEqualTo(double.MaxValue);
}
}