Improved form validation and error messages.