JS Utils Kit - v0.5.1
    Preparing search index...

    Function isEmail

    • Checks whether a given string is a valid email address.

      This function uses a practical regular expression to validate email addresses, allowing most common formats while ignoring edge cases defined by full RFC 5322. It requires the presence of an @ symbol and at least one . after it.

      Parameters

      • value: string

        The string to validate as an email address.

      Returns boolean

      • true if the string is a valid email; otherwise, false.
      isEmail('user@example.com'); // true
      isEmail('first.last@college.university.in'); // true
      isEmail('invalid-email'); // false
      isEmail('name@domain'); // false