Do not submit the form if there is a validation error