Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/server/plugins/engine/components/CheckboxesField.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ export class CheckboxesField extends SelectionControlField {
.single()
.label(this.label)
.required()
.messages({
'array.min': 'Select at least {{#limit}} options from the list',
'array.max': 'Only {{#limit}} can be selected from the list',
'array.length': 'Select only {{#limit}} options from the list'
})

if (options.required === false) {
formSchema = formSchema.optional()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,7 @@ export const messageTemplate: Record<string, JoiExpression> = {
) as JoiExpression,
dateFormat: '{{#title}} must be a real date',
dateMin: '{{#title}} must be the same as or after {{#limit}}',
dateMax: '{{#title}} must be the same as or before {{#limit}}',
arrayMax: 'Only {{#limit}} can be selected from the list',
arrayMin: 'Select at least {{#limit}} options from the list',
arrayLength: 'Select only {{#limit}} options from the list'
dateMax: '{{#title}} must be the same as or before {{#limit}}'
}

export const messages: LanguageMessagesExt = {
Expand Down
Loading