File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 151151 }
152152 if ((! debounceTime && debounceTime !== 0 ) || debounceTime < 0 || this .fieldValue .trigger === ' blur' ) return
153153 this .getValidatorModel = debounce ((modelValue ) => {
154- this .pending = false
155- this .validatorModel [this .validatorModelKey ] = modelValue
156- this .form .updatePending ()
154+ this .syncValidatorValue ()
157155 this .validate ()
158156 return modelValue
159157 }, debounceTime, false , this .validatorModel [this .validatorModelKey ])
195193 this .originValid = undefined
196194 }
197195 },
196+ syncValidatorValue () {
197+ this .pending = false
198+ this .validatorModel [this .validatorModelKey ] = this .modelValue
199+ this .form .updatePending ()
200+ },
198201 validatorChangeHandler () {
199202 // disabled or true to true no update validity
200203 if (this .validatorDisabled || (this .originValid && this .lastOriginValid )) {
Original file line number Diff line number Diff line change 124124 dispatchEvent (this .$refs .form , ' reset' )
125125 },
126126 submitHandler (e ) {
127+ // sync all fields value because trigger: blur
128+ this .syncValidatorValues ()
127129 if (this .skipValidate ) {
128130 this .$emit (EVENT_SUBMIT , e, this .model )
129131 return
169171 this .setValidating ()
170172 this .setPending ()
171173 },
174+ syncValidatorValues () {
175+ this .fields .forEach ((fieldComponent ) => {
176+ fieldComponent .syncValidatorValue ()
177+ })
178+ },
172179 validate (cb ) {
173180 const promise = cb2PromiseWithResolve (cb)
174181 if (promise) {
You can’t perform that action at this time.
0 commit comments