fix: [item-master] 필드 수정 422 유효성 검증 오류 수정

- field_key regex를 숫자 시작도 허용하도록 변경 (기존 데이터 39건 호환)
- Handler.php 422 응답에 errors 최상위 필드 추가 (프론트엔드 호환)
This commit is contained in:
김보곤
2026-03-19 10:33:58 +09:00
parent 6e50fbd1fa
commit a94cdf6eed
4 changed files with 4 additions and 3 deletions

View File

@@ -15,7 +15,7 @@ public function rules(): array
{
return [
'field_name' => 'sometimes|string|max:255',
'field_key' => 'nullable|string|max:80|regex:/^[a-zA-Z][a-zA-Z0-9_]*$/',
'field_key' => 'nullable|string|max:80|regex:/^[a-zA-Z0-9][a-zA-Z0-9_]*$/',
'field_type' => 'sometimes|in:textbox,number,dropdown,checkbox,date,textarea',
'is_required' => 'nullable|boolean',
'default_value' => 'nullable|string',