Testing form data for errors