31 lines
826 B
PHP
31 lines
826 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\User;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class UpdateTranscriptRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true; // Policy diperiksa dalam controller
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'transcript_text' => ['required', 'string', 'max:500000'],
|
|
'change_summary' => ['nullable', 'string', 'max:500'],
|
|
];
|
|
}
|
|
|
|
public function messages(): array
|
|
{
|
|
return [
|
|
'transcript_text.required' => 'Teks transkripsi tidak boleh kosong.',
|
|
'transcript_text.max' => 'Teks transkripsi terlalu panjang (maks 500,000 aksara).',
|
|
'change_summary.max' => 'Ringkasan perubahan terlalu panjang (maks 500 aksara).',
|
|
];
|
|
}
|
|
}
|