Updated form validation script