Image Validation

Hi, I'm using fileupload, and wanted to validate the image height and width(using max or min height and width) . Please give me a solution on how I can validate if the image doesn't meet the requested height and width. Thanks
6 Replies
LeandroFerreira
LeandroFerreira15mo ago
->rules(['dimensions:max_width=1000,max_height=1000']),
->rules(['dimensions:max_width=1000,max_height=1000']),
size, min, max, ratio...
Gilchrist
Gilchrist15mo ago
Thanks for the reply, I tried this but it's not working.
LeandroFerreira
LeandroFerreira15mo ago
FileUpload::make('avatar')
->disablePreview()
->rules(['dimensions:max_width=100,max_height=100'])
FileUpload::make('avatar')
->disablePreview()
->rules(['dimensions:max_width=100,max_height=100'])
Gilchrist
Gilchrist15mo ago
Actually i was trying to stop it from getting uploaded. Can it be done that way? Thanks.
Dan Harrin
Dan Harrin15mo ago
i dont think so
Gilchrist
Gilchrist15mo ago
Okay thanks.
Want results from more Discord servers?
Add your server
More Posts