Add example with validator class