title: Laravel - validate file size when PHP max upload size limit is exceeded
body: <p>I have my website hosted at a shared server. The maximum upload limit is 5MB. I do not have the ability to change the PHP ini settings, which is fine.</p>
  
  <p>In Laravel, all the validations and file uploading works fine if the uploaded file is under 5MB. However, when a file greater than 5MB is uploaded, I get the following exception instead of a validation error:</p>
  
  <p><a href="https://i.stack.imgur.com/NJcCi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NJcCi.png" alt="FileException - The file &quot;6MB_1.jpg&quot; exceeds your upload_max_filesize ini directive (limit is 5120 KiB)."></a></p>
  
  <p>How can I validate or force the file to be under the upload limit from server?</p>