Skip to content

Commit

Permalink
bug #53620 [Validator] Fix option filenameMaxLength to the File const…
Browse files Browse the repository at this point in the history
…raint (Image) (mindaugasvcs)

This PR was merged into the 6.4 branch.

Discussion
----------

[Validator] Fix option filenameMaxLength to the File constraint (Image)

| Q             | A
| ------------- | ---
| Branch?       | 6.4<!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Issues        | ... <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead -->
| License       | MIT

Recent addition of [filenameMaxLength] option to File constraint added a new error message key to ERROR_NAMES array but that change was not reflected in child class Image, so it just adds missing self::FILENAME_TOO_LONG => 'FILENAME_TOO_LONG' item to ERROR_NAMES array in Image constraint.

Commits
-------

6d15121 Fix option filenameMaxLength to the File constraint (Image)
  • Loading branch information
nicolas-grekas committed Jan 29, 2024
2 parents c3879f6 + 6d15121 commit a318801
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Symfony/Component/Validator/Constraints/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class Image extends File
self::EMPTY_ERROR => 'EMPTY_ERROR',
self::TOO_LARGE_ERROR => 'TOO_LARGE_ERROR',
self::INVALID_MIME_TYPE_ERROR => 'INVALID_MIME_TYPE_ERROR',
self::FILENAME_TOO_LONG => 'FILENAME_TOO_LONG',
self::SIZE_NOT_DETECTED_ERROR => 'SIZE_NOT_DETECTED_ERROR',
self::TOO_WIDE_ERROR => 'TOO_WIDE_ERROR',
self::TOO_NARROW_ERROR => 'TOO_NARROW_ERROR',
Expand Down

0 comments on commit a318801

Please sign in to comment.