mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-12-14 22:30:28 +05:30
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;
|
||
|
};
|