Skip to content

Instantly share code, notes, and snippets.

@Klerith
Created October 8, 2021 22:56
Show Gist options
  • Save Klerith/0a7ea40d502ee15adcaa80c42eeac522 to your computer and use it in GitHub Desktop.
Save Klerith/0a7ea40d502ee15adcaa80c42eeac522 to your computer and use it in GitHub Desktop.
Email validation - customHook
const isValidEmail = ( email: string ) => {
const re = /^(([^<>()[\]\\.,;:\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 re.test(email);
}
@luismedellin
Copy link

Gracias

@LeoSan
Copy link

LeoSan commented May 2, 2023

Thank You very much!!!

@PedroAvila
Copy link

Excellent

@Ronstein
Copy link

Ronstein commented Aug 2, 2024

gracias profe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment