Fixed form validation to be cleaner