validate class