fix(core,board,ecommerce): 조건부 검증 결함 패밀리 일괄 수정 및 실패 안내 노출

여러 화면에서 조건부(FormRequest) 검증이 우회되거나 과도하게 제한되던 결함을 한 계열로 묶어 수정한다.

- 검증 규칙 확장 필터 이름 10개를 나머지 92개와 동일 규칙으로 통일
- 설명 길이를 바이트가 아닌 글자 수로 계산(한글 오검출 해소)
- 비활성 언어팩 번역 보존한 채 수정 허용
- 알림 템플릿 제목 nullable 존중, 미지원 발송 수단 저장 차단
- 일정/실행 이력 목록 조회 검증 정합
- 게시판 첨부 미사용 시 빈 확장자 통과, new_display_hours/최소 길이 0 허용, 일괄 적용 override_values 범위 검증(SSoT)
- 이커머스 클레임 사유 조회 검증, 용어 정정
- 원문 i18n 키 노출 다수 해소, 저장/삭제 실패 시 사유 화면 노출
- 아이콘 크기/다크모드 대비 회귀 수정

번들 확장(모듈3·플러그인6·템플릿2·언어팩5) 버전 new-bump 및 CHANGELOG 반영, ja 언어팩 동기.
This commit is contained in:
HeuJung committed 2026-07-23 10:54:17 +09:00
1 parent c001b30a87
commit 7f8fb6870f
288 files changed
+5339 -1049

No files matched your search

@@ -10,12 +10,14 @@ use App\Rules\TranslatableField;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
use Illuminate\Validation\Validator;
use Modules\Sirsoft\Board\Http\Requests\Concerns\ReadsBoardLimits;
use Modules\Sirsoft\Board\Http\Requests\Concerns\ValidatesLengthRange;
use Modules\Sirsoft\Board\Rules\BoardTypeValidationRule;
use Modules\Sirsoft\Board\Rules\SlugUniqueRule;
class StoreBoardRequest extends FormRequest
{
use ReadsBoardLimits;
use ValidatesLengthRange;
/**
@@ -104,37 +106,41 @@ class StoreBoardRequest extends FormRequest
*/
public function rules(): array
{
// config에서 제한값 가져오기
$limits = config('sirsoft-board.limits', []);
$perPageMin = $limits['per_page_min'] ?? 5;
$perPageMax = $limits['per_page_max'] ?? 100;
$maxFileSizeMax = $limits['max_file_size_max'] ?? 200; // MB
$maxFileCountMax = $limits['max_file_count_max'] ?? 20;
$categoryMax = $limits['category_max'] ?? 50;
// config 기준 제한값 (폴백 기본치는 ReadsBoardLimits 트레이트가 단일 관리)
$limits = $this->boardLimits();
$perPageMin = $limits['per_page_min'];
$perPageMax = $limits['per_page_max'];
$maxFileSizeMax = $limits['max_file_size_max']; // MB
$maxFileCountMax = $limits['max_file_count_max'];
$categoryMax = $limits['category_max'];
// 제목 길이 제한
$minTitleLengthMin = $limits['min_title_length_min'] ?? 0;
$minTitleLengthMax = $limits['min_title_length_max'] ?? 200;
$maxTitleLengthMin = $limits['max_title_length_min'] ?? 1;
$maxTitleLengthMax = $limits['max_title_length_max'] ?? 200;
$minTitleLengthMin = $limits['min_title_length_min'];
$minTitleLengthMax = $limits['min_title_length_max'];
$maxTitleLengthMin = $limits['max_title_length_min'];
$maxTitleLengthMax = $limits['max_title_length_max'];
// 내용 길이 제한
$minContentLengthMin = $limits['min_content_length_min'] ?? 0;
$minContentLengthMax = $limits['min_content_length_max'] ?? 10000;
$maxContentLengthMin = $limits['max_content_length_min'] ?? 1;
$maxContentLengthMax = $limits['max_content_length_max'] ?? 50000;
$minContentLengthMin = $limits['min_content_length_min'];
$minContentLengthMax = $limits['min_content_length_max'];
$maxContentLengthMin = $limits['max_content_length_min'];
$maxContentLengthMax = $limits['max_content_length_max'];
// 댓글 길이 제한
$minCommentLengthMin = $limits['min_comment_length_min'] ?? 0;
$minCommentLengthMax = $limits['min_comment_length_max'] ?? 1000;
$maxCommentLengthMin = $limits['max_comment_length_min'] ?? 1;
$maxCommentLengthMax = $limits['max_comment_length_max'] ?? 1000;
$minCommentLengthMin = $limits['min_comment_length_min'];
$minCommentLengthMax = $limits['min_comment_length_max'];
$maxCommentLengthMin = $limits['max_comment_length_min'];
$maxCommentLengthMax = $limits['max_comment_length_max'];
// 답글/대댓글 깊이 제한
$maxReplyDepthMin = $limits['max_reply_depth_min'] ?? 1;
$maxReplyDepthMax = $limits['max_reply_depth_max'] ?? 10;
$maxCommentDepthMin = $limits['max_comment_depth_min'] ?? 0;
$maxCommentDepthMax = $limits['max_comment_depth_max'] ?? 10;
$maxReplyDepthMin = $limits['max_reply_depth_min'];
$maxReplyDepthMax = $limits['max_reply_depth_max'];
$maxCommentDepthMin = $limits['max_comment_depth_min'];
$maxCommentDepthMax = $limits['max_comment_depth_max'];
// NEW 배지 표시 기간 (0 = 표시 안 함)
$newDisplayHoursMin = $limits['new_display_hours_min'];
$newDisplayHoursMax = $limits['new_display_hours_max'];
$rules = [
// 기본 정보 (name, description은 다국어 필드 - 기본 언어만 필수)
@@ -164,7 +170,7 @@ class StoreBoardRequest extends FormRequest
'use_reply' => ['required', 'boolean'],
'use_report' => ['required', 'boolean'],
'comment_order' => ['required', 'in:ASC,DESC'],
'new_display_hours' => ['nullable', 'integer', 'min:1', 'max:720'],
'new_display_hours' => ['nullable', 'integer', "min:{$newDisplayHoursMin}", "max:{$newDisplayHoursMax}"],
// 제목 길이 제한
'min_title_length' => ['nullable', 'integer', "min:{$minTitleLengthMin}", "max:{$minTitleLengthMax}"],
@@ -236,7 +242,7 @@ class StoreBoardRequest extends FormRequest
public function attributes(): array
{
$attributes = [
'blocked_keywords' => __('sirsoft-board::admin.form.fields.blocked_keywords.label'),
'blocked_keywords' => __('sirsoft-board::validation.attributes.board.blocked_keywords'),
'add_to_menu' => __('sirsoft-board::validation.attributes.board.add_to_menu'),
];