element-plus icon indicating copy to clipboard operation
element-plus copied to clipboard

[Component] [input] form email 验证不正确

Open ZeroQuery opened this issue 7 months ago • 3 comments

Bug Type: Component

Environment

  • Vue Version: 3.5.13
  • Element Plus Version: 2.9.10
  • Browser / OS: any
  • Build Tool: Vite

Reproduction

Related Component

  • el-input

Reproduction Link

Docs

Steps to reproduce

E-mail:[email protected]

What is Expected?

识别非email字符

What is actually happening?

不识别

Additional comments

(empty)

Image

ZeroQuery avatar May 12 '25 04:05 ZeroQuery

It seems to be recognized normally. Image

btea avatar May 12 '25 08:05 btea

英文的 : 是可以正常识别

Image

中文的:会被认为是合法的字符

Image

Liao-js avatar May 12 '25 08:05 Liao-js

看起来是async-validator的正则匹配有问题,建议使用自定义匹配规则。

https://github.com/yiminghe/async-validator/blob/master/src/rule/type.ts#L9

btea avatar May 12 '25 09:05 btea