8000 bug #3432 [Reference][Form Types] Add "max_length" option in form typ… · symfony/symfony-docs@4988118 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4988118

Browse files
committed
bug #3432 [Reference][Form Types] Add "max_length" option in form type (nykopol)
This PR was merged into the 2.3 branch. Discussion ---------- [Reference][Form Types] Add "max_length" option in form type | Q | A | ------------- | --- | Doc fix? | yes | New docs? | yes | Applies to | 2.3+ | Fixed tickets | #3410 (task Form -> max_length) Commits ------- b53a227 fix last typo on max length option d6800d3 fix typo in previous commit 391fe30 fix typo in previous commit 2156545 add max_length to form field type
2 parents 26a7b1b + b53a227 commit 4988118

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 data must still be validated
10+
server-side.

0 commit comments

Comments
 (0)
0