diff options
author | dartcafe <github@dartcafe.de> | 2022-04-24 11:26:55 +0300 |
---|---|---|
committer | dartcafe <github@dartcafe.de> | 2022-04-24 11:26:55 +0300 |
commit | 17d0f20890b8c351dce8bfa356b6f08199588442 (patch) | |
tree | 70c939e06e48ab54337f4edd8533584e9e8687ad /src | |
parent | bac5af5a95291fcbc3ae37e6978d596cc77a1101 (diff) |
add prop validators
Signed-off-by: dartcafe <github@dartcafe.de>
Diffstat (limited to 'src')
-rw-r--r-- | src/js/components/Combo/ComboTable.vue | 3 | ||||
-rw-r--r-- | src/js/components/Options/OptionItem.vue | 6 | ||||
-rw-r--r-- | src/js/components/User/UserItem.vue | 15 | ||||
-rw-r--r-- | src/js/components/VoteTable/VoteTable.vue | 3 |
4 files changed, 27 insertions, 0 deletions
diff --git a/src/js/components/Combo/ComboTable.vue b/src/js/components/Combo/ComboTable.vue index a85dda92..3d3fdf8b 100644 --- a/src/js/components/Combo/ComboTable.vue +++ b/src/js/components/Combo/ComboTable.vue @@ -58,6 +58,9 @@ export default { viewMode: { type: String, default: 'table-view', + validator(value) { + return ['table-view', 'list-view'].includes(value) + }, }, }, 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) + }, }, }, diff --git a/src/js/components/User/UserItem.vue b/src/js/components/User/UserItem.vue index 4ca590ee..2e7b9e22 100644 --- a/src/js/components/User/UserItem.vue +++ b/src/js/components/User/UserItem.vue @@ -111,6 +111,21 @@ export default { type: { type: String, default: 'user', + validator(value) { + return [ + 'public', + 'internalAccess', + 'user', + 'admin', + 'group', + 'contact', + 'contactGroup', + 'circle', + 'external', + 'email', + ].includes(value) + }, + }, isNoUser: { type: Boolean, diff --git a/src/js/components/VoteTable/VoteTable.vue b/src/js/components/VoteTable/VoteTable.vue index 16ae5191..375f67f5 100644 --- a/src/js/components/VoteTable/VoteTable.vue +++ b/src/js/components/VoteTable/VoteTable.vue @@ -73,6 +73,9 @@ export default { viewMode: { type: String, default: 'table-view', + validator(value) { + return ['table-view', 'list-view'].includes(value) + }, }, }, |