Simplified validate code