8000 [Validator] Add min/max amount of pixels to Image constraint by akeeman · Pull Request #7756 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

[Validator] Add min/max amount of pixels to Image constraint #7756

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions reference/constraints/Image.rst
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,22 @@ maxHeight
If set, the height of the image file must be less than or equal to this
value in pixels.

minPixels
~~~~~~~~~

**type**: ``integer``

If set, the amount of pixels of the image file must be greater than or equal to this
value.

maxPixels
~~~~~~~~~

**type**: ``integer``

If set, the amount of pixels of the image file must be less than or equal to this
value.

maxRatio
~~~~~~~~

Expand Down Expand Up @@ -363,6 +379,22 @@ Minimum height expected is {{ min_height }}px.``

The error message if the height of the image is less than `minHeight`_.

maxPixelsMessage
~~~~~~~~~~~~~~~~

**type**: ``string`` **default**: ``The image has to many pixels ({{ pixels }} pixels).
Maximum amount expected is {{ max_pixels }} pixels.``

The error message if the amount of pixels of the image exceeds `maxPixels`_.

minPixelsMessage
~~~~~~~~~~~~~~~~

**type**: ``string`` **default**: ``The image has to few pixels ({{ pixels }} pixels).
Minimum amount expected is {{ min_pixels }} pixels.``

The error message if the amount of pixels of the image is less than `minPixels`_.

maxRatioMessage
~~~~~~~~~~~~~~~

Expand Down
0