Regex is flat out an unfit tool for actually validating domains email addresses . To actually validate a domain , you need to check that the suffix of the domain such as . com or . co . uk is a registered suffix . This involves maintaining a giant array of valid domain suffixes and performing an indexOf check . This check should never be handled on the frontend through js because of the size of this array . Without this array lookup check , invalid email addresses such as hellofakesite . poop are counted as valid . However , since this validation is best suited to be performed on a backend , it is okay for the frontend to validate email addresses with a regex pattern as long as the frontend eventually defers proper validation to the backend . In this scenario , the frontend validation is used to throttle api requests and provide immediate UI feedback to a user . But it is not used as the final source of truth on the matter of validation . Source wrote a shared front backend common pattern validation library for a major tech company .