Skip to content

is-email-address method incorrectly validates invalid email addresses #3132

Open
@RaviSadam

Description

@RaviSadam

Description

Description

The is-email-address method in the lib/@ stdlib /assert/ module is incorrectly returning true for invalid email addresses.

Related Issues

When attempting to validate email addresses using the is-email-address method, we are encountering unexpected results. For example, when providing the following inputs:

@
@gmail.com
abc@gmail
abc@

The validation does not behave as expected.

Questions

I would like to work on these issue!!

Demo

No response

Reproduction

- We need to modify the regular expression used for validating email addresses.

Expected Results

false
false
false
false

Actual Results

true
true
true
true

Version

^0.6.0

Environments

Node.js

Browser Version

No response

Node.js / npm Version

v22.11.0 / 10.9.0

Platform

Windows 11

Checklist

  • Read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions