1
0
mirror of https://github.com/django/django.git synced 2024-11-20 16:34:17 +00:00

Fixed #35880 -- Removed invalid example in form Field.required docs due to CharField.strip.

CharField.strip was introduced in 11cac1bd8e, and is True by
default, meaning the previous example of " " raised a ValidationError.
This commit is contained in:
antoliny0919 2024-11-05 07:59:14 +09:00 committed by Sarah Boyce
parent 5fa4ccab7e
commit 72de38239f

View File

@ -65,8 +65,6 @@ an empty value -- either ``None`` or the empty string (``""``) -- then
Traceback (most recent call last):
...
ValidationError: ['This field is required.']
>>> f.clean(" ")
' '
>>> f.clean(0)
'0'
>>> f.clean(True)