added basic form validation and error messages