mirror of
https://github.com/TeamPiped/Piped.git
synced 2025-07-07 03:59:53 +00: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;
|
|
};
|