mirror of
https://github.com/TeamPiped/Piped
synced 2025-09-05 21:11:09 +02:00
9 lines
333 B
JavaScript
9 lines
333 B
JavaScript
export const isEmail = input => {
|
|
// Taken from https://emailregex.com
|
|
const result = input.match(
|
|
//eslint-disable-next-line
|
|
/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
|
|
);
|
|
return result;
|
|
};
|