Use a validate method rather than a block, to reduce class complexity.