mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-03 13:04:46 +00:00
Update IntegerBlock docs to show correct kwargs (#2930)
It should be max and min value - not length. See [here](07c3ba84fb/wagtail/wagtailcore/blocks/field_block.py (L306)).
So this would work
`blocks.IntegerBlock(max_value=10, min_value=0)`
but this wouldn't do anything
`blocks.IntegerBlock(max_length=10, min_length=0)`
This commit is contained in:
parent
989cfb550f
commit
db54a9f0c4
1 changed files with 1 additions and 1 deletions
|
|
@ -103,7 +103,7 @@ IntegerBlock
|
|||
|
||||
``wagtail.wagtailcore.blocks.IntegerBlock``
|
||||
|
||||
A single-line integer input that validates that the integer is a valid whole number. The keyword arguments ``required``, ``max_length``, ``min_length`` and ``help_text`` are accepted.
|
||||
A single-line integer input that validates that the integer is a valid whole number. The keyword arguments ``required``, ``max_value``, ``min_value`` and ``help_text`` are accepted.
|
||||
|
||||
For an example of ``IntegerBlock`` in use, see :ref:`streamfield_personblock_example`
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue