added examples and corrected opt_func injection in validecorator.py