Error checking for form data.