Remove + as a valid char in emails

This commit is contained in:
Colin McDonald 2016-07-25 15:48:53 -04:00
parent 2ba32f752d
commit dc7f828e13

View File

@ -14,7 +14,8 @@ import java.util.regex.Pattern;
public class EmailUtils { public class EmailUtils {
private static final Pattern VALID_EMAIL_PATTERN = Pattern.compile( private static final Pattern VALID_EMAIL_PATTERN = Pattern.compile(
"^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", // this pattern is a slight modification (remove + as a valid char due to 'duplicate emails') of the standard one
"^[A-Z0-9._%-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$",
Pattern.CASE_INSENSITIVE Pattern.CASE_INSENSITIVE
); );
private static final HttpClient httpsClient = APIv3.getVertxInstance().createHttpClient(new HttpClientOptions().setSsl(true).setTrustAll(true)); private static final HttpClient httpsClient = APIv3.getVertxInstance().createHttpClient(new HttpClientOptions().setSsl(true).setTrustAll(true));