1
0
mirror of https://github.com/TeamPiped/Piped.git synced 2024-12-14 22:30:28 +05:30
Piped/src/utils/Misc.js

9 lines
333 B
JavaScript
Raw Normal View History

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;
};