diff --git a/src/components/Questions/Question.vue b/src/components/Questions/Question.vue
index f25b9acae..51b171c94 100644
--- a/src/components/Questions/Question.vue
+++ b/src/components/Questions/Question.vue
@@ -147,6 +147,9 @@
v-html="computedDescription" />
+
+ {{ errorMessage }}
+
@@ -160,6 +163,7 @@ import NcActionCheckbox from '@nextcloud/vue/components/NcActionCheckbox'
import NcActionInput from '@nextcloud/vue/components/NcActionInput'
import NcActions from '@nextcloud/vue/components/NcActions'
import NcButton from '@nextcloud/vue/components/NcButton'
+import NcNoteCard from '@nextcloud/vue/components/NcNoteCard'
import IconAlertCircleOutline from 'vue-material-design-icons/AlertCircleOutline.vue'
import IconArrowDown from 'vue-material-design-icons/ArrowDown.vue'
import IconArrowUp from 'vue-material-design-icons/ArrowUp.vue'
@@ -191,6 +195,7 @@ export default {
NcActionCheckbox,
NcActionInput,
NcButton,
+ NcNoteCard,
},
inject: ['$markdownit'],
@@ -260,6 +265,11 @@ export default {
type: Boolean,
default: false,
},
+
+ errorMessage: {
+ type: String,
+ default: null,
+ },
},
emits: [
@@ -314,6 +324,14 @@ export default {
hasDescription() {
return this.description !== ''
},
+
+ hasError() {
+ return !!this.errorMessage
+ },
+
+ errorId() {
+ return `q${this.index}_error`
+ },
},
// Ensure description is sized correctly on initial render
diff --git a/src/components/Questions/QuestionFile.vue b/src/components/Questions/QuestionFile.vue
index a3da70195..a4e85bea3 100644
--- a/src/components/Questions/QuestionFile.vue
+++ b/src/components/Questions/QuestionFile.vue
@@ -8,6 +8,7 @@
v-bind="questionProps"
:titlePlaceholder="answerType.titlePlaceholder"
:warningInvalid="answerType.warningInvalid"
+ :errorMessage="errorMessage"
v-on="commonListeners">
@@ -78,10 +79,6 @@
-
- {{ errorMessage }}
-
-