Skip to content

[Validator] Fix of the description of the mime type message option #16684

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

Merged
merged 1 commit into from
Apr 26, 2022
Merged
Show file tree
Hide file tree
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
11 changes: 1 addition & 10 deletions reference/constraints/File.rst
Original file line number Diff line number Diff line change
Expand Up @@ -259,16 +259,7 @@ You can find a list of existing mime types on the `IANA website`_.
The message displayed if the mime type of the file is not a valid mime type
per the `mimeTypes`_ option.

You can use the following parameters in this message:

=============== ==============================================================
Parameter Description
=============== ==============================================================
``{{ file }}`` Absolute file path
``{{ name }}`` Base file name
``{{ type }}`` The MIME type of the given file
``{{ types }}`` The list of allowed MIME types
=============== ==============================================================
.. include:: /reference/constraints/_parameters-mime-types-message-option.rst.inc

``notFoundMessage``
~~~~~~~~~~~~~~~~~~~
Expand Down
7 changes: 6 additions & 1 deletion reference/constraints/Image.rst
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,12 @@ You can find a list of existing image mime types on the `IANA website`_.
``mimeTypesMessage``
~~~~~~~~~~~~~~~~~~~~

**type**: ``string`` **default**: ``The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.``
**type**: ``string`` **default**: ``This file is not a valid image.``

The message ``The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.`` will be displayed
if the allowed `mimeTypes`_ are only a subset of ``image/*``.

.. include:: /reference/constraints/_parameters-mime-types-message-option.rst.inc

``minHeight``
~~~~~~~~~~~~~
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
You can use the following parameters in this message:

=============== ==============================================================
Parameter Description
=============== ==============================================================
``{{ file }}`` Absolute file path
``{{ name }}`` Base file name
``{{ type }}`` The MIME type of the given file
``{{ types }}`` The list of allowed MIME types
=============== ==============================================================