first
This commit is contained in:
28
app/Http/Requests/User/StoreCommentRequest.php
Normal file
28
app/Http/Requests/User/StoreCommentRequest.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\User;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class StoreCommentRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'message' => ['required', 'string', 'max:2000'],
|
||||
];
|
||||
}
|
||||
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'message.required' => 'Mesej komen tidak boleh kosong.',
|
||||
'message.max' => 'Mesej terlalu panjang (maks 2,000 aksara).',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user