Skip to content

Commit

Permalink
Set up address input so that empty answers and addresses are silently…
Browse files Browse the repository at this point in the history
… dropped
  • Loading branch information
csillag committed Oct 8, 2024
1 parent 749cdfb commit 8842114
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/ACLs/allowList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const allowList = defineACL({
description: 'You can just copy-paste your list here',
addItemLabel: 'Add address',
removeItemLabel: 'Remove address',
allowEmptyItems: [false, 'Please specify address, or remove this field!'],
dropEmptyItems: true,
minItems: 1,
allowDuplicates: [
false,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/CreatePollPage/useCreatePollForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const useCreatePollForm = () => {
minItems: [2, minCount => `You need at least ${minCount} answers in order to create this poll.`],
maxItem: [10, maxCount => `Please don't offer more than ${maxCount} answers.`],
allowDuplicates: [false, ['This answer is repeated below.', 'The same answer was already listed above!']],
allowEmptyItems: [false, 'Please either fill this in, or remove this answer.'],
dropEmptyItems: true,
minItemLength: [1, minLength => `Please use at least ${minLength} characters for this answer.`],
// maxItemLength: [10, maxLength => `Please don't use more than ${maxLength} characters for this answer.`],
})
Expand Down

0 comments on commit 8842114

Please sign in to comment.