Element: [Bug Report] Number Validation sees "55retwerterwt" as a valid number

Created on 19 Jul 2017  ·  4Comments  ·  Source: ElemeFE/element

Element UI version

1.3.7

OS/Browsers version

chrome

Vue version

2.3.4

Reproduction Link

https://jsfiddle.net/1x78c6at/

Steps to reproduce

type this value in field in provider link: 44fgsdgdfs

What is Expected?

Should not validate as success because 44fgsdgdfs it is not a number

What is actually happening?

does validate as success

Most helpful comment

是被转换为44了,但是逻辑上不应该是通过验证的啊!获取到的数据没有错,但是在展示上通过会给用户造成也允许填写非数字类型的错觉。

All 4 comments

Hi, your JSFiddle page is blank because it seems you forgot to click the Save button. Please save your fiddle and then edit this issue with the new link.

updated.

https://jsfiddle.net/1x78c6at/2/

Typing 44fgsdgdfs and you'll see actually numberValidateForm.age is converted to 44. So it passes validation.

是被转换为44了,但是逻辑上不应该是通过验证的啊!获取到的数据没有错,但是在展示上通过会给用户造成也允许填写非数字类型的错觉。

Was this page helpful?
0 / 5 - 0 ratings