How to validate the existence of email before submitting form