aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/src/components/NewFileRequestDialog.vue
diff options
context:
space:
mode:
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