subDay()->format('Y-m-d'); $today = Carbon::create()->addDay()->format('Y-m-d'); $formats = join(',', array_keys(config('firefly.export_formats'))); return [ 'start_date' => 'required|date|after:' . $first, 'end_date' => 'required|date|before:' . $today, 'accounts' => 'required', 'job' => 'required|belongsToUser:export_jobs,key', 'accounts.*' => 'required|exists:accounts,id|belongsToUser:accounts', 'include_attachments' => 'in:0,1', 'include_config' => 'in:0,1', 'exportFormat' => 'in:' . $formats, ]; } }