mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #34473 -- Fixed step validation for form fields with non-zero minimum value.
This commit is contained in:
committed by
Mariusz Felisiak
parent
549d6ffeb6
commit
1fe0b167af
@@ -316,7 +316,9 @@ class IntegerField(Field):
|
||||
if min_value is not None:
|
||||
self.validators.append(validators.MinValueValidator(min_value))
|
||||
if step_size is not None:
|
||||
self.validators.append(validators.StepValueValidator(step_size))
|
||||
self.validators.append(
|
||||
validators.StepValueValidator(step_size, offset=min_value)
|
||||
)
|
||||
|
||||
def to_python(self, value):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user