{"action":"created","issue":{"url":"https://api.github.com/repos/marshmallow-code/marshmallow/issues/461","repository_url":"https://api.github.com/repos/marshmallow-code/marshmallow","labels_url":"https://api.github.com/repos/marshmallow-code/marshmallow/issues/461/labels{/name}","comments_url":"https://api.github.com/repos/marshmallow-code/marshmallow/issues/461/comments","events_url":"https://api.github.com/repos/marshmallow-code/marshmallow/issues/461/events","html_url":"https://github.com/marshmallow-code/marshmallow/issues/461","id":156465548,"number":461,"title":"skip_on_fields_errors doesn't work for validates_schema","user":{"login":"martinstein","id":1275070,"avatar_url":"https://avatars.githubusercontent.com/u/1275070?v=3","gravatar_id":"","url":"https://api.github.com/users/martinstein","html_url":"https://github.com/martinstein","followers_url":"https://api.github.com/users/martinstein/followers","following_url":"https://api.github.com/users/martinstein/following{/other_user}","gists_url":"https://api.github.com/users/martinstein/gists{/gist_id}","starred_url":"https://api.github.com/users/martinstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinstein/subscriptions","organizations_url":"https://api.github.com/users/martinstein/orgs","repos_url":"https://api.github.com/users/martinstein/repos","events_url":"https://api.github.com/users/martinstein/events{/privacy}","received_events_url":"https://api.github.com/users/martinstein/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-24T09:50:04Z","updated_at":"2016-05-24T12:19:15Z","closed_at":null,"body":"Here's a simple test case to reproduce the problem based on the example in the docs\r\n\r\n```python\r\nfrom marshmallow import Schema, fields, validates_schema, ValidationError\r\n\r\nclass NumberSchema(Schema):\r\n    field_a = fields.Integer()\r\n    field_b = fields.Integer()\r\n\r\n    @validates_schema\r\n    def validate_numbers(self, data, skip_on_field_errors=True):\r\n        if data['field_b'] >= data['field_a']:\r\n            raise ValidationError('field_a must be greater than field_b')\r\n\r\nschema = NumberSchema()\r\nresult, errors = schema.load({'field_a': 2, 'field_b': \"bbbb\"})\r\n```\r\nThe `validate_numbers` method should be skipped because validation of `field_b` fails (since field_b contains a string). However, it is not skipped (which of course causes problems since that method expects `data['field_b']` to exist)."},"comment":{"url":"https://api.github.com/repos/marshmallow-code/marshmallow/issues/comments/221251203","html_url":"https://github.com/marshmallow-code/marshmallow/issues/461#issuecomment-221251203","issue_url":"https://api.github.com/repos/marshmallow-code/marshmallow/issues/461","id":221251203,"user":{"login":"sloria","id":2379650,"avatar_url":"https://avatars.githubusercontent.com/u/2379650?v=3","gravatar_id":"","url":"https://api.github.com/users/sloria","html_url":"https://github.com/sloria","followers_url":"https://api.github.com/users/sloria/followers","following_url":"https://api.github.com/users/sloria/following{/other_user}","gists_url":"https://api.github.com/users/sloria/gists{/gist_id}","starred_url":"https://api.github.com/users/sloria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sloria/subscriptions","organizations_url":"https://api.github.com/users/sloria/orgs","repos_url":"https://api.github.com/users/sloria/repos","events_url":"https://api.github.com/users/sloria/events{/privacy}","received_events_url":"https://api.github.com/users/sloria/received_events","type":"User","site_admin":false},"created_at":"2016-05-24T12:19:15Z","updated_at":"2016-05-24T12:19:15Z","body":"Make sure you are passing `skip_on_field_errors=True` to the decorator, not to the method."}}
{"actor":{"display_login":"sloria"}}