mirror of
https://github.com/django/django.git
synced 2025-04-22 00:04:43 +00:00
[5.1.x] Fixed #35880 -- Removed invalid example in form Field.required docs due to CharField.strip.
CharField.strip was introduced in 11cac1bd8ef7546ca32d9969d4348bf412dc6664, and is True by default, meaning the previous example of " " raised a ValidationError. Backport of 72de38239fdc97751e1e4ed245c7073c31bbd28a from main.
This commit is contained in:
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user