const isValid = String(email)
        .toLowerCase()
        .match(
        /^(([^<>()[\]\\.,;:\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,}))$/
      );
      
      Javascript language logo

      Validate email address

      My JavaScript recipes

      Validate an email in JavaScript using regular expression.

      Remember that JavaScript might be disabled in your browser and that server-side validation is always required.

      Shortcut: email.isvalid

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.