Dec 4, 2023
0
Level 50
Laravel Voyager accept only 2 image validation?
Hi Folks I created the project & used Voyager as a Laravel admin. There is bread Called Page & in that bread, there is a section called Image I added the type as a multiple image which accept multiple images but I want to add validation that image takes max 2 images no more. If there is already 1 image & user tried to add the 2 more image than it will show the error..
I tried Method:
{
"image": "max:2"
}
{
"validation": {
"rule": "array|max:2"
}
}
{
"validation": {
"image": "array|max:3"
}
}
I added this type of validation but i when I tried to upload 5 images it accepted it the error show the error called that the image size must be in 2 kilobytes Now how can I fix this validation.
Please or to participate in this conversation.