3.0 optional validation

Adding an example to show how to use the `on` option with a callable in the `Validator` class.