nullbool's avatar

Multiple Fixed Dimension Rules in Form Request Validation for image upload

Spec only allows users to upload images with fixed sizes (e.g., 300x250, 400x200, etc., etc.). I tried doing something like this 'image' => 'required|image|dimensions:width=300,height=250|dimensions:width=400,height=200' but neither worked, seems like they cancel each other out. Is a custom rule the only way to go, or am I doing something wrong? Thanks!

0 likes
1 reply

Please or to participate in this conversation.