This is a JavaScript function to validate the formatting of an email or a list of emails.
This function will return a single boolean. In the case of validating a list of emails, it will return false if one of the email formats is invalid.
validateEmail('bezos@amazon.com');
validateEmail('bezos@amazon.com, bill@microsoft.com');