Implemented some basic form validation.