Fix capitalization in error messages

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-03-26 13:53:49 -03:00
commit f741b97ac5

View file

@ -10,12 +10,12 @@ class RangeSpec(BaseModel):
@classmethod
def max_must_be_greater_than_min(cls, v, values, **kwargs):
if "min" in values.data and v <= values.data["min"]:
raise ValueError("max must be greater than min")
raise ValueError("Max must be greater than min")
return v
@field_validator("step")
@classmethod
def step_must_be_positive(cls, v):
if v <= 0:
raise ValueError("step must be positive")
raise ValueError("Step must be positive")
return v