first
This commit is contained in:
30
app/Http/Requests/User/UpdateTranscriptRequest.php
Normal file
30
app/Http/Requests/User/UpdateTranscriptRequest.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?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).',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user