{"action":"created","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/15201","labels_url":"https://api.github.com/repos/symfony/symfony/issues/15201/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/15201/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/15201/events","html_url":"https://github.com/symfony/symfony/pull/15201","id":93042042,"number":15201,"title":"Unique entity custom message","user":{"login":"razmo","id":1369214,"avatar_url":"https://avatars.githubusercontent.com/u/1369214?v=3","gravatar_id":"","url":"https://api.github.com/users/razmo","html_url":"https://github.com/razmo","followers_url":"https://api.github.com/users/razmo/followers","following_url":"https://api.github.com/users/razmo/following{/other_user}","gists_url":"https://api.github.com/users/razmo/gists{/gist_id}","starred_url":"https://api.github.com/users/razmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/razmo/subscriptions","organizations_url":"https://api.github.com/users/razmo/orgs","repos_url":"https://api.github.com/users/razmo/repos","events_url":"https://api.github.com/users/razmo/events{/privacy}","received_events_url":"https://api.github.com/users/razmo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-07-04T19:50:39Z","updated_at":"2015-07-23T21:14:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/symfony/symfony/pulls/15201","html_url":"https://github.com/symfony/symfony/pull/15201","diff_url":"https://github.com/symfony/symfony/pull/15201.diff","patch_url":"https://github.com/symfony/symfony/pull/15201.patch"},"body":"| Q             | A\r\n| ------------- | ---\r\n| Bug fix?      | no\r\n| New feature?  | yes\r\n| BC breaks?    | no\r\n| Deprecations? | no\r\n| Tests pass?   | yes\r\n| Fixed tickets | -\r\n| License       | MIT\r\n| Doc PR        | -\r\n\r\nAdd the possibility to have custom message for unique entity constraint.\r\nFor example if we have a collection of entities in a form, the message can be more expressive.\r\n\r\nExample:\r\n```\r\n/**\r\n * Town\r\n *\r\n * @ORM\\Entity()\r\n * @UniqueEntity(fields={\"city\"}, message=\"The city '{{ city }}' is already used.\")\r\n */\r\nclass Town\r\n{\r\n```\r\n\r\nI accidentally closed the previous opened PR (#13787), that why a recreate a pull request."},"comment":{"url":"https://api.github.com/repos/symfony/symfony/issues/comments/124242269","html_url":"https://github.com/symfony/symfony/pull/15201#issuecomment-124242269","issue_url":"https://api.github.com/repos/symfony/symfony/issues/15201","id":124242269,"user":{"login":"razmo","id":1369214,"avatar_url":"https://avatars.githubusercontent.com/u/1369214?v=3","gravatar_id":"","url":"https://api.github.com/users/razmo","html_url":"https://github.com/razmo","followers_url":"https://api.github.com/users/razmo/followers","following_url":"https://api.github.com/users/razmo/following{/other_user}","gists_url":"https://api.github.com/users/razmo/gists{/gist_id}","starred_url":"https://api.github.com/users/razmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/razmo/subscriptions","organizations_url":"https://api.github.com/users/razmo/orgs","repos_url":"https://api.github.com/users/razmo/repos","events_url":"https://api.github.com/users/razmo/events{/privacy}","received_events_url":"https://api.github.com/users/razmo/received_events","type":"User","site_admin":false},"created_at":"2015-07-23T21:14:37Z","updated_at":"2015-07-23T21:14:37Z","body":"@OskarStark test updated"}}