['sometimes', 'nullable', 'array', new LocaleRequiredTranslatable(maxLength: 500)], 'body' => ['required', 'array', new LocaleRequiredTranslatable(maxLength: 65535)], 'click_url' => ['nullable', 'string', 'max:500'], 'recipients' => ['sometimes', 'nullable', 'array'], 'recipients.*.type' => ['required', 'string', 'in:trigger_user,related_user,role,specific_users'], 'recipients.*.value' => ['nullable'], 'recipients.*.relation' => ['nullable', 'string', 'max:100'], 'recipients.*.exclude_trigger_user' => ['nullable', 'boolean'], 'is_active' => ['sometimes', 'boolean'], ]; return HookManager::applyFilters( 'core.notification_template.update_validation_rules', $rules, $this->route('template') ); } /** * 검증 메시지를 반환합니다. * * @return array 규칙별 오류 메시지 */ public function messages(): array { return [ 'subject.required' => __('validation.required', ['attribute' => __('notification.subject')]), 'body.required' => __('validation.required', ['attribute' => __('notification.body')]), ]; } }