There currently isn't a method to allow error messages that link to the entity containing unique data. We want to link to the entity so users can either correct the information or report a case where duplicate data is actually valid.
The upcoming patch adds an [existing-entity-label] and [existing-entity-link] tokens. It also supports field collections and referencing the actual entity containing duplicate data instead of the field collection entity itself.
For example, set the Custom error message to
Email address ([value]) already exists on [existing-entity-link]., and Email address (test@example.com) already exists on <a href="/node/2">Example Person</a>. will be returned.
Comments
Comment #1
deviantintegral commentedComment #2
g089h515r806 commentedcommited.
I made a small change to prevent "Strict warning: Only variables should be passed by reference":
from
to