stdlib-js / stdlib-js/stdlib

is-email-address method incorrectly validates invalid email addresses

Đang mở
#3,132 9 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
6k
Fork
1.3k
Merge trung bình
1 ngày 3 giờ
Pull request đã merge (30 ngày)
611

Mô tả

### 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

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

### Expected Results

```shell
false
false
false
false
```

### Actual Results

```shell
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

- [x] Read and understood the [Code of Conduct](https://github.com/stdlib-js/stdlib/blob/develop/CODE_OF_CONDUCT.md).
- [x] Searched for existing issues and pull requests.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

The target is the is-email-address method in lib/@stdlib/assert/; start by locating its email-validation regular expression and checking the four examples in the issue. Done means all four inputs return false; verify the method with the module's existing checks after the change.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
javascript
Lĩnh vực
testing
Loại issue
Lỗi
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
50/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.