瀏覽代碼

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.
antoliny0919 4 月之前
父節點
當前提交
72de38239f
共有 1 個文件被更改,包括 0 次插入2 次删除
  1. 0 2
      docs/ref/forms/fields.txt

+ 0 - 2
docs/ref/forms/fields.txt

@@ -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)