Your IP : 216.73.216.79


Current Path : /var/www/html/reddsis/app/Http/Requests/Backend/
Upload File :
Current File : /var/www/html/reddsis/app/Http/Requests/Backend/ContentDownloadRequest.php

<?php

namespace App\Http\Requests\Backend;

use Illuminate\Foundation\Http\FormRequest;

class ContentDownloadRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     */
    public function authorize(): bool
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
     */
    public function rules(): array
    {
        return [
            'download_title' => 'required|string|max:255',
            'download_language' => 'nullable|string|max:255',
            'download_source' => 'nullable|string|max:255',
            'download_category' => 'nullable|string|max:255',
            'download_status' => 'nullable|string|max:255',
            'download_date' => 'nullable|date',
            'download_start_date' => 'nullable|date',
            'download_start_time' => 'nullable|date_format:H:i',
            'download_end_date' => 'nullable|date|after_or_equal:download_start_date',
            'download_end_time' => 'nullable|date_format:H:i',
            'download_img' => 'nullable|image|max:5120', // Max 5MB
            'download_file' => 'nullable|file|max:20480', // Max 20MB
        ];
    }
}