Why can I submit a form when testing it even when the required fields are on?