Skip to content
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

Explain the limitations of the custom messages in UniqueEntity #6932

Closed
wants to merge 4 commits into from

Conversation

javiereguiluz
Copy link
Member

This fixes #6929. Thanks goes to @HeahDude, who made all the "detective work" to find this limitation.

@@ -132,7 +132,11 @@ message

**type**: ``string`` **default**: ``This value is already used.``

The message that's displayed when this constraint fails.
The message that's displayed when this constraint fails. When using multiple
fields, the ``{{ vallue }}`` parameter only contains the value of the first
Copy link
Contributor

Choose a reason for hiding this comment

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

actually {{ value }} represents the entity, but only the first invalid field will trigger a violation to its path

@HeahDude
Copy link
Contributor

Wonderful 👍 Thanks!

Status: reviewed

@OskarStark
Copy link
Contributor

👍

@xabbuh
Copy link
Member

xabbuh commented Sep 21, 2016

This was first included in Symfony 3.1, wasn't it? I would also add a versionadded directive:

.. versionadded:: 3.1
    The ability to include the invalid value into the message was introduced
    in Symfony 3.1.

Status: Needs work

@javiereguiluz
Copy link
Member Author

@xabbuh I've finally added the missing versionadded directive. Thanks!

@xabbuh
Copy link
Member

xabbuh commented Oct 4, 2016

👍

Status: Reviewed

@wouterj
Copy link
Member

wouterj commented Oct 6, 2016

Thanks for documenting this new feature Javier! I've merged this into 3.1, because this feature was introduced in 3.1 according to Christian.

@wouterj wouterj closed this Oct 6, 2016
wouterj added a commit that referenced this pull request Oct 6, 2016
…eEntity (javiereguiluz)

This PR was submitted for the 2.8 branch but it was merged into the 3.1 branch instead (closes #6932).

Discussion
----------

Explain the limitations of the custom messages in UniqueEntity

This fixes #6929. Thanks goes to @HeahDude, who made all the "detective work" to find this limitation.

Commits
-------

4c10ea8 Explain the limitations of the custom messages in UniqueEntity
@javiereguiluz javiereguiluz deleted the fix_6929 branch May 24, 2018 16:04
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.

None yet

6 participants