Skip to content
Closed
Changes from 1 commit
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
6 changes: 5 additions & 1 deletion reference/constraints/UniqueEntity.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

wrong field. Therefore, you cannot define a custom message that displays all
the wrong values (e.g. the following won't work:
``This {{ name }} name and {{ email }} email combination is in use. Change either of them``)

em
~~
Expand Down