validation on class dialog