Jorge Jorge - 6 months ago 58
Javascript Question

Javascript multiple email regexp validation

Normally validation of simple email is:


This will validate email like

But how to validate if email is multiple?

entry 1:,,
entry 2: , ,
entry 3:, ,
entry 4:

This emails is a possible entries that user will input. Also expect thier is 2 or 3 or 4 or more emails sometimes.

Thanks for the answers.


Split the emails on a comma and validate the entries

var x = getEmails();
var emails = x.split(",");
emails.forEach(function (email) {

Where getEmails() gets the emails from the page, and validate runs your regex against the emails