Skip to content

Commit dd6c0a7

Browse files
committed
[Reference][Form Types] Add missing options for "form" type
1 parent f285d93 commit dd6c0a7

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed

reference/forms/types/form.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,8 @@ on all fields.
5959

6060
.. include:: /reference/forms/types/options/invalid_message_parameters.rst.inc
6161

62+
.. include:: /reference/forms/types/options/extra_fields_message.rst.inc
63+
64+
.. include:: /reference/forms/types/options/post_max_size_message.rst.inc
65+
66+
.. include:: /reference/forms/types/options/pattern.rst.inc
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
extra_fields_message
2+
~~~~~~~~~~~~~~~~~~~~
3+
4+
**type**: ``string`` **default**: ``This form should not contain extra fields.``
5+
6+
This is the validation error message that's used if the submitted form data
7+
contains one or more fields that are not part of the form definition. The
8+
placeholder ``{{ extra_fields }}`` can be used to display a comma separated
9+
list of the submitted extra field names.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
pattern
2+
~~~~~~~
3+
4+
**type**: ``string`` **default**: ``null``
5+
6+
This option adds a ``pattern`` attribute to restrict the field input by a
7+
regular expression.
8+
9+
.. caution:
10+
11+
This validation is client-side only.
12+
13+
.. note:
14+
15+
When using validation constraints, this option is set automatically
16+
for some constraints to match the server-side validation.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
post_max_size_message
2+
~~~~~~~~~~~~~~~~~~~~~
3+
4+
**type**: ``string`` **default**: ``The uploaded file was too large. Please try to upload a smaller file.``
5+
6+
This is the validation error message that's used if submitted POST form data
7+
exceeds php.ini's ``post_max_size``. The ``{{ max }}`` placeholder can be used
8+
to display the allowed size.
9+
10+
.. note:
11+
12+
Validating the ``post_max_size`` only happens on the root form.

0 commit comments

Comments
 (0)