Skip to content

[Validator] Add the option filenameMaxLength to the File constraint #17955

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
Feb 27, 2023

Conversation

alexandre-daubois
Copy link
Member

Fixes #17953


The message displayed if the filename of the file exceeds the limit set
with the ``filenameMaxLength`` option.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can add :

You can use the following parameters in this message:

==============================  ==============================================================
Parameter                       Description
==============================  ==============================================================
``{{ filename_max_length }}``   Maximum number of characters allowed
==============================  ==============================================================

I saw some similar thing for other options.

Thanks for the PR :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oooh yeah definitely. Thank you!

@alexandre-daubois alexandre-daubois force-pushed the filenamelength-constraint branch from 48243ec to 83fb4d4 Compare February 22, 2023 18:18
``filenameMaxLength``
~~~~~~~~~~~~~~~~~~~~~

**type**: ``int`` **default**: ``null``
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**type**: ``int`` **default**: ``null``
**type**: ``integer`` **default**: ``null``

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be spotted by DOCtor-RST 🤔 , was this the case?

Copy link
Member Author

@alexandre-daubois alexandre-daubois Feb 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexandre-daubois alexandre-daubois force-pushed the filenamelength-constraint branch from 83fb4d4 to 1a1fb8f Compare February 23, 2023 16:14
@OskarStark
Copy link
Contributor

Thank you Alexandre.

@OskarStark OskarStark merged commit 5a2af0f into symfony:6.3 Feb 27, 2023
@alexandre-daubois alexandre-daubois deleted the filenamelength-constraint branch February 27, 2023 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants