example of using validator