aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/src/components/NewFileRequestDialog.vue
diff options
context:
space:
mode:
authorskjnldsv <skjnldsv@protonmail.com>2025-01-29 11:23:44 +0100
committernextcloud-command <nextcloud-command@users.noreply.github.com>2025-01-30 13:23:43 +0000
commit46d58ce2078434af1b1a7e5ff31c8879db1ceb52 (patch)
tree7c0d8d0cd84eaed1b3fa3e1e865109064312e626 /apps/files_sharing/src/components/NewFileRequestDialog.vue
parente84a12c6f65cacae5e4bcc689e0c477ad3de5f31 (diff)
downloadnextcloud-server-backport/50524/stable30.tar.gz
nextcloud-server-backport/50524/stable30.zip
fix(files_sharing): file request form validity check resetbackport/50524/stable30
Signed-off-by: skjnldsv <skjnldsv@protonmail.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'apps/files_sharing/src/components/NewFileRequestDialog.vue')
-rw-r--r--apps/files_sharing/src/components/NewFileRequestDialog.vue13
1 files changed, 9 insertions, 4 deletions
diff --git a/apps/files_sharing/src/components/NewFileRequestDialog.vue b/apps/files_sharing/src/components/NewFileRequestDialog.vue
index 893830ca98e..03bc0007769 100644
--- a/apps/files_sharing/src/components/NewFileRequestDialog.vue
+++ b/apps/files_sharing/src/components/NewFileRequestDialog.vue
@@ -218,10 +218,9 @@ export default defineComponent({
methods: {
onPageNext() {
const form = this.$refs.form as HTMLFormElement
- if (!form.checkValidity()) {
- form.reportValidity()
- return
- }
+
+ // Reset custom validity
+ form.querySelectorAll('input').forEach(input => input.setCustomValidity(''))
// custom destination validation
// cannot share root
@@ -232,6 +231,12 @@ export default defineComponent({
return
}
+ // If the form is not valid, show the error message
+ if (!form.checkValidity()) {
+ form.reportValidity()
+ return
+ }
+
if (this.currentStep === STEP.FIRST) {
this.currentStep = STEP.SECOND
return