mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[5.1.x] Fixed #35880 -- Removed invalid example in form Field.required docs due to CharField.strip.
CharField.strip was introduced in11cac1bd8e, and is True by default, meaning the previous example of " " raised a ValidationError. Backport of72de38239ffrom main.
This commit is contained in:
committed by
Sarah Boyce
parent
a0d8fad23e
commit
cae0c7f48a
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user