Skip to content
Permalink
Browse files

PRESIDECMS-1815 Fix Javascript splitting on multiple separators

  • Loading branch information
sebduggan committed Mar 24, 2020
1 parent f30e879 commit 159bd3cf383d392309c355026af64ce73d82d44d
Showing with 1 addition and 1 deletion.
  1. +1 −1 system/services/validation/CoreValidators.cfc
@@ -131,7 +131,7 @@ component validationProvider=true {
if ( !value.length ) return true;
var emailRegex = /^[^.\s@]+(?:\.[^.\s@]+)*@(?:[^\s\.@]+\.)+([^\s\.@]{2,})$/;
if ( !el.multiple ) return value.match( emailRegex ) !== null;
var emails = value.split( ', ' );
var emails = value.split( /[ ,]+/ );
for( var i=0; i<emails.length; i++ ) {
if ( emails[ i ].match( emailRegex ) === null ) return false;
}

0 comments on commit 159bd3c

Please sign in to comment.
You can’t perform that action at this time.