Skip to content

Commit 63d7823

Browse files
authored
validate svg ratio image
1 parent 9ba07e3 commit 63d7823

File tree

1 file changed

+20
-24
lines changed

1 file changed

+20
-24
lines changed

reference/constraints/Image.rst

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,10 @@ add several other options.
210210

211211
If this option is false, the image cannot be landscape oriented.
212212

213+
.. versionadded:: 7.3
214+
215+
The ``allowLandscape`` option support for SVG files was introduced in Symfony 7.3.
216+
213217
``allowLandscapeMessage``
214218
~~~~~~~~~~~~~~~~~~~~~~~~~
215219

@@ -234,6 +238,10 @@ Parameter Description
234238

235239
If this option is false, the image cannot be portrait oriented.
236240

241+
.. versionadded:: 7.3
242+
243+
The ``allowPortrait`` option support for SVG files was introduced in Symfony 7.3.
244+
237245
``allowPortraitMessage``
238246
~~~~~~~~~~~~~~~~~~~~~~~~
239247

@@ -260,6 +268,10 @@ If this option is false, the image cannot be a square. If you want to force
260268
a square image, then leave this option as its default ``true`` value
261269
and set `allowLandscape`_ and `allowPortrait`_ both to ``false``.
262270

271+
.. versionadded:: 7.3
272+
273+
The ``allowSquare`` option support for SVG files was introduced in Symfony 7.3.
274+
263275
``allowSquareMessage``
264276
~~~~~~~~~~~~~~~~~~~~~~
265277

@@ -306,10 +318,6 @@ function, which requires the `PHP GD extension`_ to be enabled.
306318
If set, the height of the image file must be less than or equal to this
307319
value in pixels.
308320

309-
.. versionadded:: 7.3
310-
311-
The ``maxHeight`` option support for SVG files was introduced in Symfony 7.3.
312-
313321
``maxHeightMessage``
314322
~~~~~~~~~~~~~~~~~~~~
315323

@@ -335,10 +343,6 @@ Parameter Description
335343
If set, the amount of pixels of the image file must be less than or equal to this
336344
value.
337345

338-
.. versionadded:: 7.3
339-
340-
The ``maxPixels`` option support for SVG files was introduced in Symfony 7.3.
341-
342346
``maxPixelsMessage``
343347
~~~~~~~~~~~~~~~~~~~~
344348

@@ -366,6 +370,10 @@ Parameter Description
366370
If set, the aspect ratio (``width / height``) of the image file must be less
367371
than or equal to this value.
368372

373+
.. versionadded:: 7.3
374+
375+
The ``maxRatio`` option support for SVG files was introduced in Symfony 7.3.
376+
369377
``maxRatioMessage``
370378
~~~~~~~~~~~~~~~~~~~
371379

@@ -391,10 +399,6 @@ Parameter Description
391399
If set, the width of the image file must be less than or equal to this
392400
value in pixels.
393401

394-
.. versionadded:: 7.3
395-
396-
The ``maxWidth`` option support for SVG files was introduced in Symfony 7.3.
397-
398402
``maxWidthMessage``
399403
~~~~~~~~~~~~~~~~~~~
400404

@@ -437,10 +441,6 @@ error message will be instead: ``The mime type of the file is invalid ({{ type }
437441
If set, the height of the image file must be greater than or equal to this
438442
value in pixels.
439443

440-
.. versionadded:: 7.3
441-
442-
The ``minHeight`` option support for SVG files was introduced in Symfony 7.3.
443-
444444
``minHeightMessage``
445445
~~~~~~~~~~~~~~~~~~~~
446446

@@ -466,10 +466,6 @@ Parameter Description
466466
If set, the amount of pixels of the image file must be greater than or equal to this
467467
value.
468468

469-
.. versionadded:: 7.3
470-
471-
The ``minPixels`` option support for SVG files was introduced in Symfony 7.3.
472-
473469
``minPixelsMessage``
474470
~~~~~~~~~~~~~~~~~~~~
475471

@@ -497,6 +493,10 @@ Parameter Description
497493
If set, the aspect ratio (``width / height``) of the image file must be greater
498494
than or equal to this value.
499495

496+
.. versionadded:: 7.3
497+
498+
The ``minRatio`` option support for SVG files was introduced in Symfony 7.3.
499+
500500
``minRatioMessage``
501501
~~~~~~~~~~~~~~~~~~~
502502

@@ -522,10 +522,6 @@ Parameter Description
522522
If set, the width of the image file must be greater than or equal to this
523523
value in pixels.
524524

525-
.. versionadded:: 7.3
526-
527-
The ``minWidth`` option support for SVG files was introduced in Symfony 7.3.
528-
529525
``minWidthMessage``
530526
~~~~~~~~~~~~~~~~~~~
531527

0 commit comments

Comments
 (0)