element icon indicating copy to clipboard operation
element copied to clipboard

[Bug Report] form validate: after called this.resetForm('ruleForm') in mounted, the error information didn't disappear.

Open DoryDuan opened this issue 9 years ago • 4 comments

Element UI version

1.3.3

OS/Browsers version

Google

Vue version

2.3.3

Reproduction Link

https://jsfiddle.net/axzL7v19/8/

Steps to reproduce

My demand is from other page jump to the form page,and I need to clear the information of the form. So I called this.resetForm('ruleForm') in mounted. "Step1:click the button" created immediately" "Step2:focus on" menu" "Step3:select" menu" The error information didn't disappear.

What is Expected?

After filled the information in address, the error information should be disappeared.

What is actually happening?

The error information didn't disappear.

DoryDuan avatar May 16 '17 01:05 DoryDuan

Same here, im using ajax to get Validation rules and after i modified the data vue triggers a change so, all my fields get red. Then i call reset on next tick but errors wont dissapear on input.

alanaasmaa avatar May 26 '17 12:05 alanaasmaa

@baiyaaaaa dalao take a look? Minimal repro: https://jsfiddle.net/axzL7v19/13/

Leopoldthecoder avatar May 29 '17 03:05 Leopoldthecoder

Actually, It's not a bug, If you set value manually, you should reset the field munually too.

baiyaaaaa avatar May 31 '17 02:05 baiyaaaaa

It's because the autocomplete model value state4 not nested in the ruleForm model. It's not a bug. resetForm() Only reset the value in the model prop

baiyaaaaa avatar Jul 24 '17 06:07 baiyaaaaa