Level 75
You will probably need custom validation since you will need an if and possible an or statement. Perhaps see this section:
https://laravel.com/docs/8.x/validation#using-closures
Just suggestion.
1 like
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!
Please or to participate in this conversation.