Files
ilycats/app/Http/Requests/CatStoreRequest.php
T
2026-02-08 15:16:35 +07:00

32 lines
737 B
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class CatStoreRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return false;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'nama_kucing' => 'required|string|max:255',
'jenis_kelamin' => 'required|in:Jantan,Betina',
'foto' => 'nullable|image|mimes:jpg,jpeg,png|max:2048',
'tanggal_lahir' => 'nullable|date',
];
}
}