@@ -212,6 +212,20 @@ maxSizeMessage
212212
213213The message displayed if the file is larger than the `maxSize `_ option.
214214
215+ You can use the following parameters in this message:
216+
217+ +------------------+------------------------------------------------+
218+ | Parameter | Description |
219+ +==================+================================================+
220+ | ``{{ size }} `` | File size of the given file |
221+ +------------------+------------------------------------------------+
222+ | ``{{ limit }} `` | Maximum file size allowed |
223+ +------------------+------------------------------------------------+
224+ | ``{{ suffix }} `` | Suffix for the used file size unit (see above) |
225+ +------------------+------------------------------------------------+
226+ | ``{{ file }} `` | Absolute file path |
227+ +------------------+------------------------------------------------+
228+
215229mimeTypesMessage
216230~~~~~~~~~~~~~~~~
217231
@@ -220,6 +234,18 @@ mimeTypesMessage
220234The message displayed if the mime type of the file is not a valid mime type
221235per the `mimeTypes `_ option.
222236
237+ You can use the following parameters in this message:
238+
239+ +-----------------+----------------------------------------+
240+ | Parameter | Description |
241+ +=================+========================================+
242+ | ``{{ type }} `` | The MIME type of the given file |
243+ +-----------------+----------------------------------------+
244+ | ``{{ types }} `` | The list of allowed MIME types |
245+ +-----------------+----------------------------------------+
246+ | ``{{ file }} `` | Absolute file path |
247+ +-----------------+----------------------------------------+
248+
223249disallowEmptyMessage
224250~~~~~~~~~~~~~~~~~~~~
225251
@@ -228,6 +254,14 @@ disallowEmptyMessage
228254This constraint checks if the uploaded file is empty (i.e. 0 bytes). If it is,
229255this message is displayed.
230256
257+ You can use the following parameters in this message:
258+
259+ +----------------+--------------------+
260+ | Parameter | Description |
261+ +================+====================+
262+ | ``{{ file }} `` | Absolute file path |
263+ +----------------+--------------------+
264+
231265notFoundMessage
232266~~~~~~~~~~~~~~~
233267
@@ -237,6 +271,14 @@ The message displayed if no file can be found at the given path. This error
237271is only likely if the underlying value is a string path, as a ``File `` object
238272cannot be constructed with an invalid file path.
239273
274+ You can use the following parameters in this message:
275+
276+ +----------------+--------------------+
277+ | Parameter | Description |
278+ +================+====================+
279+ | ``{{ file }} `` | Absolute file path |
280+ +----------------+--------------------+
281+
240282notReadableMessage
241283~~~~~~~~~~~~~~~~~~
242284
@@ -245,6 +287,14 @@ notReadableMessage
245287The message displayed if the file exists, but the PHP ``is_readable() `` function
246288fails when passed the path to the file.
247289
290+ You can use the following parameters in this message:
291+
292+ +----------------+--------------------+
293+ | Parameter | Description |
294+ +================+====================+
295+ | ``{{ file }} `` | Absolute file path |
296+ +----------------+--------------------+
297+
248298uploadIniSizeErrorMessage
249299~~~~~~~~~~~~~~~~~~~~~~~~~
250300
@@ -253,6 +303,16 @@ uploadIniSizeErrorMessage
253303The message that is displayed if the uploaded file is larger than the ``upload_max_filesize ``
254304``php.ini `` setting.
255305
306+ You can use the following parameters in this message:
307+
308+ +------------------+------------------------------------------------+
309+ | Parameter | Description |
310+ +==================+================================================+
311+ | ``{{ limit }} `` | Maximum file size allowed |
312+ +------------------+------------------------------------------------+
313+ | ``{{ suffix }} `` | Suffix for the used file size unit (see above) |
314+ +------------------+------------------------------------------------+
315+
256316uploadFormSizeErrorMessage
257317~~~~~~~~~~~~~~~~~~~~~~~~~~
258318
@@ -261,14 +321,65 @@ uploadFormSizeErrorMessage
261321The message that is displayed if the uploaded file is larger than allowed
262322by the HTML file input field.
263323
324+ This message has no parameters.
325+
326+ uploadPartialErrorMessage
327+ ~~~~~~~~~~~~~~~~~~~~~~~~~
328+
329+ **type **: ``string `` **default **: ``The file was only partially uploaded. ``
330+
331+ The message that is displayed if the uploaded file is only partially uploaded.
332+
333+ This message has no parameters.
334+
335+ uploadNoFileErrorMessage
336+ ~~~~~~~~~~~~~~~~~~~~~~~~
337+
338+ **type **: ``string `` **default **: ``No file was uploaded. ``
339+
340+ The message that is displayed if no file was uploaded.
341+
342+ This message has no parameters.
343+
344+ uploadNoTmpDirErrorMessage
345+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
346+
347+ **type **: ``string `` **default **: ``No temporary folder was configured in php.ini. ``
348+
349+ The message that is displayed if the php.ini setting ``upload_tmp_dir `` is
350+ missing.
351+
352+ This message has no parameters.
353+
354+ uploadCantWriteErrorMessage
355+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
356+
357+ **type **: ``string `` **default **: ``Cannot write temporary file to disk. ``
358+
359+ The message that is displayed if the uploaded file can't be stored in the
360+ temporary folder.
361+
362+ This message has no parameters.
363+
364+ uploadExtensionErrorMessage
365+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
366+
367+ **type **: ``string `` **default **: ``A PHP extension caused the upload to fail. ``
368+
369+ The message that is displayed if a PHP extension caused the file upload to
370+ fail.
371+
372+ This message has no parameters.
373+
264374uploadErrorMessage
265375~~~~~~~~~~~~~~~~~~
266376
267377**type **: ``string `` **default **: ``The file could not be uploaded. ``
268378
269379The message that is displayed if the uploaded file could not be uploaded
270- for some unknown reason, such as the file upload failed or it couldn't be
271- written to disk.
380+ for some unknown reason.
381+
382+ This message has no parameters.
272383
273384.. include :: /reference/constraints/_payload-option.rst.inc
274385
0 commit comments