Form validation and tests