ElemeFE / element

A Vue.js 2.0 UI Toolkit for Web
https://element.eleme.io/
MIT License
54.12k stars 14.64k forks source link

[bug report] form validation date rule error #20042

Open BobsLi opened 4 years ago

BobsLi commented 4 years ago

Element UI version

2.13.2

OS/Browsers version

win10/ Chrome83.0.4103.116

Vue version

3.0.0-rc.5

Reproduction Link

https://codepen.io/bobsli/pen/YzqwNbo?editable=true%3Dhttps%3A%2F%2Felement.eleme.cn%2F2.13%2F

Steps to reproduce

官方文档的示例代码中 `

改为如下:

` 然后控制台报错

What is Expected?

控制台不报错误信息

What is actually happening?

控制台报错

element-bot commented 4 years ago

Translation of this issue:

Element UI version

2.13.2

OS/Browsers version

win10/ Chrome83.0.4103.116

Vue version

3.0.0-rc.5

Reproduction Link

https://codepen.io/bobsli/pen/YzqwNbo?editable=true%3Dhttps%3A%2F%2Felement.eleme.cn%2F2.13%2F

Steps to reproduce

In the example code of the official document

` < El date picker type = date "holder = select date" V-model=“ ruleForm.date1 " style="width: 100%;">

` Change to read as follows:

` < El date picker type = date "holder = select date" V-model=“ ruleForm.date1 " format="yyyy-MM" value-format="yyyy-MM-dd" style="width: 100%;">

` Then the console reports an error

What is Expected?

The console does not report an error message

What is actually happening?

Console error

erjun commented 4 years ago

你把日期字段校验的type: 'date'去掉就ok了,也不需要校验这个。你设置value-format后就是字符串类型了,但是你又校验是不是日期类型,所以才报错

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.