Adding example for using `on` with a closure in the validator