Files
sam-api/app/Http/Requests/Client/ClientStoreRequest.php
hskwon c87aadc357 feat: ClientApi.php Swagger 점검 및 개선 (Phase 3-3)
- ClientStoreRequest.php 생성 (검증 로직 분리)
- ClientUpdateRequest.php 생성 (검증 로직 분리)
- ClientController.php FormRequest 적용 및 패턴 통일
- lang/ko/message.php client 메시지 키 추가
- ApiResponse::handle 패턴 통일 (메시지 두 번째 인자)
- SAM API Development Rules 준수 완료
2025-11-07 02:40:18 +09:00

27 lines
696 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',
'is_active' => 'nullable|in:Y,N',
];
}
}