Skip to content

Commit 92f4506

Browse files
skjnldsvnextcloud-command
authored andcommitted
fix(files_sharing): file request form validity check reset
Signed-off-by: skjnldsv <[email protected]>
1 parent 16921d7 commit 92f4506

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

apps/files_sharing/src/components/NewFileRequestDialog.vue

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,9 @@ export default defineComponent({
218218
methods: {
219219
onPageNext() {
220220
const form = this.$refs.form as HTMLFormElement
221-
if (!form.checkValidity()) {
222-
form.reportValidity()
223-
return
224-
}
221+
222+
// Reset custom validity
223+
form.querySelectorAll('input').forEach(input => input.setCustomValidity(''))
225224
226225
// custom destination validation
227226
// cannot share root
@@ -232,6 +231,12 @@ export default defineComponent({
232231
return
233232
}
234233
234+
// If the form is not valid, show the error message
235+
if (!form.checkValidity()) {
236+
form.reportValidity()
237+
return
238+
}
239+
235240
if (this.currentStep === STEP.FIRST) {
236241
this.currentStep = STEP.SECOND
237242
return

0 commit comments

Comments
 (0)