mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-28 11:42:15 -05:00
fixed #290
This commit is contained in:
parent
3b7f89bbb0
commit
aa844df144
@ -5,7 +5,7 @@ import java.util.regex.Pattern;
|
|||||||
|
|
||||||
public class Validator {
|
public class Validator {
|
||||||
public static final Pattern VALID_JID =
|
public static final Pattern VALID_JID =
|
||||||
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);
|
Pattern.compile("\\b^[^@/<>'\"\\s]+@[^@/<>'\"\\s]+$", Pattern.CASE_INSENSITIVE);
|
||||||
|
|
||||||
public static boolean isValidJid(String jid) {
|
public static boolean isValidJid(String jid) {
|
||||||
Matcher matcher = VALID_JID.matcher(jid);
|
Matcher matcher = VALID_JID.matcher(jid);
|
||||||
|
Loading…
Reference in New Issue
Block a user