Corrected validation script