how to set max repeat for a repeater
I want to limit user to upload up to 3 images. I am using the repeater for this. is this best practice ? and if yes how can I limit the user to upload at least one and at most 3 images?
Solution
You can do this
Repeater::make('members')
->schema([
// ...
])
->minItems(2)
->maxItems(5)
Repeater::make('members')
->schema([
// ...
])
->minItems(2)
->maxItems(5)