Open jflemingframe opened 4 months ago
I do see a similar issue here: https://github.com/vuetifyjs/vuetify/issues/17501 Please fix this. Calling await formRef.validate() should be expected to work. Not return early with the prior value. I suppose its understandable if the form isnt updated when update:modelValue is called? But that seems like a confusing limitation.
I've at least logged that there is a workaround for this.
The workaround suggested here is in conflict:
Environment
Vuetify Version: 3.6.8 Vue Version: 3.4.27 Browsers: Chrome 124.0.0.0 OS: Windows 10
Steps to reproduce
Expected Behavior
calling formRef.validate() in the modelValue event handler should show that the form is valid.
Actual Behavior
The 1st validation rule is run with a "" value. Its always just the first. The result of validation is set to false. Then the rules are run again with the real values. The result of form validation is still false.
Reproduction Link
https://play.vuetifyjs.com/#...
Workaround
Call await formRef.validate() twice in a row.
Other comments
Workaround: Call await formRef.validate() twice in a row. Feels like this happens the first time a form is validated (first input event).
Prior issue (#19089) seems very similar but was closed. They did not call validate() outright there.
In our app we wish to emit some values if the form is valid. This includes while typing or pasting a value.