Files
sam-api/app/Http/Requests/Client/ClientStoreRequest.php
hskwon 165512e121 feat: [client] Client API 사업자 정보 필드 및 toggle 버그 수정
- business_no, business_type, business_item 필드 추가
- toggle 로직 수정: boolean 캐스팅 호환 (is_active === 'Y' → !is_active)
2025-12-04 15:58:08 +09:00

31 lines
867 B
PHP

<?php
namespace App\Http\Requests\Client;
use Illuminate\Foundation\Http\FormRequest;
class ClientStoreRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'client_group_id' => 'nullable|integer',
'client_code' => 'required|string|max:50',
'name' => 'required|string|max:100',
'contact_person' => 'nullable|string|max:100',
'phone' => 'nullable|string|max:20',
'email' => 'nullable|email|max:100',
'address' => 'nullable|string|max:255',
'business_no' => 'nullable|string|max:20',
'business_type' => 'nullable|string|max:50',
'business_item' => 'nullable|string|max:100',
'is_active' => 'nullable|in:Y,N',
];
}
}