mirror of
https://github.com/openpgpjs/openpgpjs.git
synced 2025-11-24 06:25:50 +00:00
refactor: update email regex
This commit is contained in:
parent
5afbf72c30
commit
dac26fbd0b
@ -88,7 +88,7 @@ class UserIDPacket {
|
||||
* since they interfere with `comment` parsing.
|
||||
*/
|
||||
|
||||
const isValidEmail = str => /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(str);
|
||||
const isValidEmail = str => /^[a-zA-Z0-9._%+-]+@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z0-9]{2,63}$/.test(str);
|
||||
const firstBracket = userID.indexOf('<');
|
||||
const lastBracket = userID.lastIndexOf('>');
|
||||
if (
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user