mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Fixed #12030 -- Validate integer field range at the model level.
Thanks to @timgraham for the review.
This commit is contained in:
@@ -678,6 +678,11 @@ Models
|
||||
Previously this used to work if the field accepted integers as input as it
|
||||
took the primary key.
|
||||
|
||||
* Integer fields are now validated against database backend specific min and
|
||||
max values based on their :meth:`internal_type <django.db.models.Field.get_internal_type>`.
|
||||
Previously model field validation didn't prevent values out of their associated
|
||||
column data type range from being saved resulting in an integrity error.
|
||||
|
||||
Signals
|
||||
^^^^^^^
|
||||
|
||||
|
||||
Reference in New Issue
Block a user