File tree 1 file changed +14
-1
lines changed
1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ form type.
20
20
| Applies to | :ref: `property or method <validation-property-target >` |
21
21
+----------------+---------------------------------------------------------------------+
22
22
| Options | - `maxSize `_ |
23
+ | | - `binaryFormat `_ |
23
24
| | - `mimeTypes `_ |
24
25
| | - `maxSizeMessage `_ |
25
26
| | - `mimeTypesMessage `_ |
@@ -78,7 +79,7 @@ below a certain file size and a valid PDF, add the following:
78
79
maxSize : 1024k
79
80
mimeTypes : [application/pdf, application/x-pdf]
80
81
mimeTypesMessage : Please upload a valid PDF
81
-
82
+
82
83
83
84
.. code-block :: php-annotations
84
85
@@ -151,6 +152,18 @@ have been specified.
151
152
Options
152
153
-------
153
154
155
+ .. versionadded :: 2.6
156
+ The ``binaryFormat `` option was introduced in Symfony 2.6.
157
+
158
+ binaryFormat
159
+ ~~~~~~~~~~~~
160
+
161
+ **type **: ``boolean `` **default **: ``null ``
162
+
163
+ When true, the sizes will be displayed in messages with binary suffixes (KiB, MiB).
164
+ When false, the sizes will be displayed with SI suffixes (kB, MB).
165
+ When null, then the binaryFormat will be guessed from the suffix defined in the maxSize option.
166
+
154
167
maxSize
155
168
~~~~~~~
156
169
You can’t perform that action at this time.
0 commit comments