8000 add max_length to form field type · symfony/symfony-docs@2156545 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2156545

Browse files
committed
add max_length to form field type
1 parent 0428c57 commit 2156545

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

reference/forms/types/form.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ on all fields.
4141

4242
.. include:: /reference/forms/types/options/block_name.rst.inc
4343

44+
.. include:: /reference/forms/types/options/max_length.rst.inc
45+
4446
inherit_data
4547
------------
4648

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
max_length
22
~~~~~~~~~~
33

4-
**type**: ``integer``
4+
**type**: ``integer`` **default**: ``null``
55

6-
This option is used to add a ``maxlength`` attribute, which is used by
7-
some browsers to limit the amount of text in a field.
6+
If this option is not null, an attribute ``maxlength`` is added, which
7+
is used by some browsers to limit the amount of text in a field.
8+
9+
This is just a browser validation, so datas still must be validated
10+
server side.

0 commit comments

Comments
 (0)
0