You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: reference/constraints/File.rst
+32Lines changed: 32 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -268,6 +268,38 @@ You can find a list of existing mime types on the `IANA website`_.
268
268
(i.e. the form type is not defined explicitly in the ``->add()`` method of
269
269
the form builder) and when the field doesn't define its own ``accept`` value.
270
270
271
+
``filenameMaxLength``
272
+
~~~~~~~~~~~~~~~~~~~~~
273
+
274
+
**type**: ``integer`` **default**: ``null``
275
+
276
+
.. versionadded:: 6.3
277
+
278
+
The ``filenameMaxLength`` was introduced in Symfony 6.3.
279
+
280
+
If set, the validator will check that the filename of the underlying file
281
+
doesn't exceed a certain length.
282
+
283
+
``filenameTooLongMessage``
284
+
~~~~~~~~~~~~~~~~~~~~~~~~~~
285
+
286
+
**type**: ``string`` **default**: ``The filename is too long. It should have {{ filename_max_length }} character or less.|The filename is too long. It should have {{ filename_max_length }} characters or less.``
287
+
288
+
.. versionadded:: 6.3
289
+
290
+
The ``filenameTooLongMessage`` was introduced in Symfony 6.3.
291
+
292
+
The message displayed if the filename of the file exceeds the limit set
293
+
with the ``filenameMaxLength`` option.
294
+
295
+
You can use the following parameters in this message:
0 commit comments