first
This commit is contained in:
32
app/Http/Requests/User/UploadExternalTranscriptRequest.php
Normal file
32
app/Http/Requests/User/UploadExternalTranscriptRequest.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\User;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class UploadExternalTranscriptRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'transcript_file' => ['required', 'file', 'mimetypes:text/plain', 'extensions:txt', 'max:10240'],
|
||||
'clean_with_ollama' => ['nullable', 'boolean'],
|
||||
'confirmed' => ['nullable', 'boolean'],
|
||||
];
|
||||
}
|
||||
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'transcript_file.required' => 'Sila pilih fail transkripsi (.txt).',
|
||||
'transcript_file.mimetypes' => 'Fail mesti berformat teks biasa (.txt).',
|
||||
'transcript_file.extensions'=> 'Hanya fail .txt dibenarkan.',
|
||||
'transcript_file.max' => 'Saiz fail terlalu besar (maks 10 MB).',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user