diff options
author | the-username <the-username@users.noreply.github.com> | 2014-05-15 20:43:10 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2014-05-17 12:50:17 +0200 |
commit | e34fddd7e1aa26da75b5ad61a4af7504c1db497c (patch) | |
tree | 0e3e4b070d1ee480ad916d6d926ff24342a3f908 /src/eu | |
parent | a32d95cdd39a62af35df31a2907c3761e1657ef3 (diff) |
Update Validator.java
Diffstat (limited to 'src/eu')
-rw-r--r-- | src/eu/siacs/conversations/utils/Validator.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/utils/Validator.java b/src/eu/siacs/conversations/utils/Validator.java index fce953ae..51d8b25c 100644 --- a/src/eu/siacs/conversations/utils/Validator.java +++ b/src/eu/siacs/conversations/utils/Validator.java @@ -5,7 +5,7 @@ import java.util.regex.Pattern; public class Validator { public static final Pattern VALID_JID = - Pattern.compile("^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", Pattern.CASE_INSENSITIVE); + Pattern.compile("\\b^[A-Z0-9._%+-]+@([A-Z0-9.-]+\\.)?\\d{1,3}[.]\\d{1,3}[.]\\d{1,3}[.]\\d{1,3}\\b$|^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", Pattern.CASE_INSENSITIVE); public static boolean isValidJid(String jid) { Matcher matcher = VALID_JID.matcher(jid); |