Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordartcafe <github@dartcafe.de>2022-04-24 11:26:55 +0300
committerdartcafe <github@dartcafe.de>2022-04-24 11:26:55 +0300
commit17d0f20890b8c351dce8bfa356b6f08199588442 (patch)
tree70c939e06e48ab54337f4edd8533584e9e8687ad /src/js/components/Options
parentbac5af5a95291fcbc3ae37e6978d596cc77a1101 (diff)
add prop validators
Signed-off-by: dartcafe <github@dartcafe.de>
Diffstat (limited to 'src/js/components/Options')
-rw-r--r--src/js/components/Options/OptionItem.vue6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/js/components/Options/OptionItem.vue b/src/js/components/Options/OptionItem.vue
index de51ec15..5a9253f5 100644
--- a/src/js/components/Options/OptionItem.vue
+++ b/src/js/components/Options/OptionItem.vue
@@ -102,10 +102,16 @@ export default {
display: {
type: String,
default: 'textBox',
+ validator(value) {
+ return ['textBox', 'dateBox'].includes(value)
+ },
},
pollType: {
type: String,
default: 'textPoll',
+ validator(value) {
+ return ['textPoll', 'datePoll'].includes(value)
+ },
},
},