Adding example for using `on` with a closure in the validator
Merge pull request #979 from cakephp/3.0-optional-validation

3.0 optional validation