According to the documentation:
$validator = Validator::make($request->all(), [
'file' => 'max:500000',
]);
The value is in kilobytes, for example:
-
max:10240
= max 10 MB. -
max:1
= max 1024 bytes.
Note that there are efforts to change the value of
1 kilobytes
from original1024
to1000
bytes, but major frameworks likeLaravel
remain using original1024
value, which prevents confusion of senior developers (which are used to1024
).