{"action":"created","issue":{"url":"https://api.github.com/repos/mwitkow/go-proto-validators/issues/21","repository_url":"https://api.github.com/repos/mwitkow/go-proto-validators","labels_url":"https://api.github.com/repos/mwitkow/go-proto-validators/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/mwitkow/go-proto-validators/issues/21/comments","events_url":"https://api.github.com/repos/mwitkow/go-proto-validators/issues/21/events","html_url":"https://github.com/mwitkow/go-proto-validators/issues/21","id":205016022,"number":21,"title":"unique identifier for validation errors","user":{"login":"sigmonsays","id":123410,"avatar_url":"https://avatars.githubusercontent.com/u/123410?v=3","gravatar_id":"","url":"https://api.github.com/users/sigmonsays","html_url":"https://github.com/sigmonsays","followers_url":"https://api.github.com/users/sigmonsays/followers","following_url":"https://api.github.com/users/sigmonsays/following{/other_user}","gists_url":"https://api.github.com/users/sigmonsays/gists{/gist_id}","starred_url":"https://api.github.com/users/sigmonsays/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sigmonsays/subscriptions","organizations_url":"https://api.github.com/users/sigmonsays/orgs","repos_url":"https://api.github.com/users/sigmonsays/repos","events_url":"https://api.github.com/users/sigmonsays/events{/privacy}","received_events_url":"https://api.github.com/users/sigmonsays/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-02-02T22:28:29Z","updated_at":"2017-02-20T20:54:29Z","closed_at":null,"body":"Would it be possible to specify a list of unique integer ids for the type of validation that failed?\r\n\r\nThis would atleast allow the caller to write code to uniquely handled specific conditions\r\n\r\nFor instance\r\n<pre>\r\n\terr := message.Validate()\r\n\tverr := err.(*validator.Error)\r\n\tif verr.Code == 5 {\r\n\t\tfmt.Printf(\"this is a fatal error\")\r\n\t} else {\r\n\t\tfmt.Printf(\"this is a temporary error\")\r\n\t}\r\n<pre>"},"comment":{"url":"https://api.github.com/repos/mwitkow/go-proto-validators/issues/comments/281179096","html_url":"https://github.com/mwitkow/go-proto-validators/issues/21#issuecomment-281179096","issue_url":"https://api.github.com/repos/mwitkow/go-proto-validators/issues/21","id":281179096,"user":{"login":"mwitkow","id":9655971,"avatar_url":"https://avatars.githubusercontent.com/u/9655971?v=3","gravatar_id":"","url":"https://api.github.com/users/mwitkow","html_url":"https://github.com/mwitkow","followers_url":"https://api.github.com/users/mwitkow/followers","following_url":"https://api.github.com/users/mwitkow/following{/other_user}","gists_url":"https://api.github.com/users/mwitkow/gists{/gist_id}","starred_url":"https://api.github.com/users/mwitkow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwitkow/subscriptions","organizations_url":"https://api.github.com/users/mwitkow/orgs","repos_url":"https://api.github.com/users/mwitkow/repos","events_url":"https://api.github.com/users/mwitkow/events{/privacy}","received_events_url":"https://api.github.com/users/mwitkow/received_events","type":"User","site_admin":false},"created_at":"2017-02-20T20:54:29Z","updated_at":"2017-02-20T20:54:29Z","body":"Would you mean an error per: field, field-validator, or a declarative code (you provide which code failed)?\r\n\r\nIf you need this now, can you use the `human_error` as a hint to differentiate the `field-level` error in the mean time?\r\n\r\n"}}
{"actor":{"display_login":"mwitkow"}}