File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ form type.
23
23
| | - `mimeTypes `_ |
24
24
| | - `maxSizeMessage `_ |
25
25
| | - `mimeTypesMessage `_ |
26
+ | | - `disallowEmptyMessage `_ |
26
27
| | - `notFoundMessage `_ |
27
28
| | - `notReadableMessage `_ |
28
29
| | - `uploadIniSizeErrorMessage `_ |
@@ -194,6 +195,18 @@ mimeTypesMessage
194
195
The message displayed if the mime type of the file is not a valid mime type
195
196
per the `mimeTypes `_ option.
196
197
198
+ disallowEmptyMessage
199
+ ~~~~~~~~~~~~~~~~~~~~
200
+
201
+ .. versionadded :: 2.6
202
+ The ``disallowEmptyMessage `` option was introduced in Symfony 2.6. Prior to 2.6,
203
+ if the user uploaded an empty file, no validation error occurred.
204
+
205
+ **type **: ``string `` **default **: ``An empty file is not allowed. ``
206
+
207
+ This constraint checks if the uploaded file is empty (i.e. 0 bytes). If it is,
208
+ this message is displayed.
209
+
197
210
notFoundMessage
198
211
~~~~~~~~~~~~~~~
199
212
You can’t perform that action at this time.
0 commit comments