How do I write a Class-Based Django Validator?

I'm using Django 1.8. The documentation on writing validators has an example of a function-based validator. It also says the following on using a class: You can also use a class with a __call__()