class validate