What will be regular expression to validate email address so that multiple Email should not be entered comma separated, it should be semi colon separated . Is below mentioned expression is valid?
function validateEmail($email) {
var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
return emailReg.test($email);
This Regular expression is also validating Email that are comma separated. What I want is that For example : john1@gmail.com,john2@gmail.com this string is entered by user than error will reflect.
But it should validate successfully to this: john1@gmail.com;john2@gmail.com