|string> */ public function rules(): array { $rules = [ 'source' => 'nullable|string|in:active,bundled,github', 'from_version' => 'nullable|string|regex:/^\d+\.\d+\.\d+(-[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*)?$/', 'to_version' => 'nullable|string|regex:/^\d+\.\d+\.\d+(-[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*)?$/|required_with:from_version', ]; return HookManager::applyFiltersWithLegacyName( 'core.extension.changelog_validation_rules', 'core.extension.changelog_rules', $rules); } /** * 검증 에러 메시지를 정의합니다. * * @return array */ public function messages(): array { return [ 'source.in' => __('common.changelog_validation.source_in'), 'from_version.regex' => __('common.changelog_validation.version_format', ['attribute' => __('validation.attributes.from_version')]), 'to_version.regex' => __('common.changelog_validation.version_format', ['attribute' => __('validation.attributes.to_version')]), 'to_version.required_with' => __('common.changelog_validation.to_version_required'), ]; } }