Improve test of form validation