laravel file size validation not working

Updated at 04-Aug-2021, By samar

laravel file size validation not working

Hello everyone, in this post we will examine how to solve the "laravel file size validation not working" programming puzzle.

If the laravel size validation not working you can use the max attribute for file size. There are lots of attributes available in laravel to validate input files with their size using validator facaces.
  • Laravel file size validation

    //Import validator facades
    use Illuminate\Support\Facades\Validator;
    //Call validator facades on the request input file
    $validator = Validator::make($request->all(), [
        'file' => 'max:500000',

    You can validate file size in laravel using the max attribute on the validator facades. 

Back to code snippet queries related laravel