New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is this a typo of fields.ValidatedField._validated, line#1138 #659

Closed
wonderbeyond opened this Issue Jul 18, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@wonderbeyond

wonderbeyond commented Jul 18, 2017

https://github.com/marshmallow-code/marshmallow/blob/dev/marshmallow/fields.py#L1138

class ValidatedField(Field):
    """A field that validates input on serialization."""

    def _validated(self, value):
        raise NotImplementedError('Must implement _validate method')

    def _serialize(self, value, *args, **kwargs):
        ret = super(ValidatedField, self)._serialize(value, *args, **kwargs)
        return self._validated(ret)

Must implement _validate method

should it be _validated?

@sloria

This comment has been minimized.

Member

sloria commented Jul 18, 2017

Yes, that is a typo. PR's welcome =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment