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
->rules(['dimensions:max_width=1000,max_height=1000']),
->rules(['dimensions:max_width=1000,max_height=1000']),
size, min, max, ratio...
gilchrist9889
gilchrist9889OP2y ago
Thanks for the reply, I tried this but it's not working.
LeandroFerreira
FileUpload::make('avatar')
->disablePreview()
->rules(['dimensions:max_width=100,max_height=100'])
FileUpload::make('avatar')
->disablePreview()
->rules(['dimensions:max_width=100,max_height=100'])
gilchrist9889
gilchrist9889OP2y ago
Actually i was trying to stop it from getting uploaded. Can it be done that way? Thanks.
Dan Harrin
Dan Harrin2y ago
i dont think so
gilchrist9889
gilchrist9889OP2y ago
Okay thanks.
Want results from more Discord servers?
Add your server