add in-class validation example