{"action":"created","issue":{"url":"https://api.github.com/repos/marshmallow-code/marshmallow/issues/502","repository_url":"https://api.github.com/repos/marshmallow-code/marshmallow","labels_url":"https://api.github.com/repos/marshmallow-code/marshmallow/issues/502/labels{/name}","comments_url":"https://api.github.com/repos/marshmallow-code/marshmallow/issues/502/comments","events_url":"https://api.github.com/repos/marshmallow-code/marshmallow/issues/502/events","html_url":"https://github.com/marshmallow-code/marshmallow/issues/502","id":167265496,"number":502,"title":"`validate()` doesn't respect the `attribute` parameter","user":{"login":"os","id":66500,"avatar_url":"https://avatars.githubusercontent.com/u/66500?v=3","gravatar_id":"","url":"https://api.github.com/users/os","html_url":"https://github.com/os","followers_url":"https://api.github.com/users/os/followers","following_url":"https://api.github.com/users/os/following{/other_user}","gists_url":"https://api.github.com/users/os/gists{/gist_id}","starred_url":"https://api.github.com/users/os/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/os/subscriptions","organizations_url":"https://api.github.com/users/os/orgs","repos_url":"https://api.github.com/users/os/repos","events_url":"https://api.github.com/users/os/events{/privacy}","received_events_url":"https://api.github.com/users/os/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-25T01:10:47Z","updated_at":"2016-07-25T05:37:22Z","closed_at":null,"body":"Here's an example:\r\n\r\n```\r\n>>> from marshmallow import Schema\r\n>>> from marshmallow import fields\r\n>>> \r\n>>> class User(Schema):\r\n...     name = fields.String(attribute='first_name', required=True)\r\n...     age = fields.Integer()\r\n... \r\n>>> u = User()\r\n>>> u.validate({})\r\n{'name': ['Missing data for required field.']}\r\n>>> u.validate({'first_name': 'John'})\r\n{'name': ['Missing data for required field.']}\r\n```\r\n\r\nI'm not sure if this is a design decision or a bug, but I would expect `validate()` to respect the `attribute` parameter."},"comment":{"url":"https://api.github.com/repos/marshmallow-code/marshmallow/issues/comments/234844818","html_url":"https://github.com/marshmallow-code/marshmallow/issues/502#issuecomment-234844818","issue_url":"https://api.github.com/repos/marshmallow-code/marshmallow/issues/502","id":234844818,"user":{"login":"os","id":66500,"avatar_url":"https://avatars.githubusercontent.com/u/66500?v=3","gravatar_id":"","url":"https://api.github.com/users/os","html_url":"https://github.com/os","followers_url":"https://api.github.com/users/os/followers","following_url":"https://api.github.com/users/os/following{/other_user}","gists_url":"https://api.github.com/users/os/gists{/gist_id}","starred_url":"https://api.github.com/users/os/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/os/subscriptions","organizations_url":"https://api.github.com/users/os/orgs","repos_url":"https://api.github.com/users/os/repos","events_url":"https://api.github.com/users/os/events{/privacy}","received_events_url":"https://api.github.com/users/os/received_events","type":"User","site_admin":false},"created_at":"2016-07-25T05:37:22Z","updated_at":"2016-07-25T05:37:22Z","body":"I see, thanks. For my case it seems like I should use `load_from` instead of `attribute`."}}
{"actor":{"display_login":"os"}}