corrected error for validate