Welcome Guest, Not a member yet? Register   Sign In
Validate file if a select is...
#3

(03-17-2021, 02:16 AM)iRedds Wrote: If you upload a file, then information about it is in a separate array.
Use a request instance instead of $data.

PHP Code:
$file Config\Services::request()->getFile('field_name');

if (
$file !== null && $file->valid()) { // file uploaded without errors 
  // ....

how can i do this in validation?
Reply


Messages In This Thread
Validate file if a select is... - by pippuccio76 - 03-16-2021, 01:06 PM
RE: Validate file if a select is... - by iRedds - 03-17-2021, 02:16 AM
RE: Validate file if a select is... - by pippuccio76 - 03-17-2021, 02:18 AM
RE: Validate file if a select is... - by kenjis - 03-17-2021, 05:21 PM



Theme © iAndrew 2016 - Forum software by © MyBB