Class validators

Here's an example: https://github.com/philtay/marshmallow/blob/bc8a11fa3b7bad39109a4e75b3ff74f36d08afed/tests/test_serialization.py#L88-92