validate class for definition