added basic form validation.