Convert nested validators into classes.
Add to_json decorator.
Simplify conditional expression.