Skip to content

Commit e2817dd

Browse files
Apply a joi.array.min to non-optional fiel upload fields
1 parent 2322ed2 commit e2817dd

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/server/plugins/engine/components/FileUploadField.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ export class FileUploadField extends FormComponent {
134134

135135
if (typeof schema.min === 'number') {
136136
formSchema = formSchema.min(schema.min)
137+
} else if (options.required !== false) {
138+
formSchema = formSchema.min(1)
137139
}
138140
} else {
139141
formSchema = formSchema.length(schema.length)

0 commit comments

Comments
 (0)