Skip to content

Conversation

@Hrepay
Copy link
Member

@Hrepay Hrepay commented Oct 30, 2025

#️⃣ 관련 이슈

Resolved #327

💡작업 내용

이번 PR에서 작업한 내용을 간략히 설명해주세요(이미지 첨부 가능)

닉네임 유효성 검사 시스템 개선

  • NicknameValidator.swift 파일을 추가하여 닉네임 유효성 검사 규칙(길이, 공백, 허용 문자, 연속 특수문자, 이모지, 숫자 전용, 금칙어 등)을 중앙에서 관리하도록 개선했습니다.
  • NicknameBannedWords.swift 파일을 추가하여 시스템, 서비스, 비속어 등 금칙어를 체계적으로 정의하고 검사하는 로직을 구현했습니다.
  • NicknameTextFieldResultType 열거형(enum)을 확장하여, invalidLength, bannedWord 등 세분화된 유효성 검사 결과에 따라 구체적인 힌트 메시지, 텍스트 색상, 테두리 색상을 반환하도록 수정했습니다.
  • SetNickNameViewControllerCombine을 도입하여, 디바운스(debounced)가 적용된 실시간 닉네임 유효성 검사 및 UI 피드백 기능을 구현하고 기존 로직을 제거했습니다.
  • SetNickNameView의 UI 피드백 로직을 새로운 결과 타입과 테두리 색상을 사용하도록 업데이트하고, 불필요한 유효성 검사 메서드를 삭제했습니다.
  • TextLiteral.swift의 힌트 메시지를 변경된 닉네임 길이 요구사항에 맞게 수정했습니다.

Simulator Screen Recording - iPhone Air - 2025-10-30 at 21 16 44

💬리뷰 요구사항(선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

ex) 메서드 XXX의 이름을 더 잘 짓고 싶은데 혹시 좋은 명칭이 있을까요?

  • 욕설 관련 필터링은 아직 미구현 상태입니다. 현재는 프론트에서 임시 구현해 놓았습니다.

@gemini-code-assist
Copy link

Summary of Changes

Hello @Hrepay, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 닉네임 유효성 검사 시스템을 대폭 개선합니다. 중앙 집중식 유효성 검사 로직과 금칙어 관리를 도입하고, Combine 프레임워크를 활용하여 실시간으로 사용자에게 상세한 UI 피드백을 제공합니다. 이를 통해 닉네임 설정 과정의 사용자 경험을 향상시키고 데이터 무결성을 강화하는 것을 목표로 합니다.

Highlights

  • 닉네임 유효성 검사 시스템 개선: 닉네임 유효성 검사 규칙(길이, 공백, 허용 문자, 연속 특수문자, 이모지, 숫자 전용, 금칙어 등)을 중앙에서 관리하는 NicknameValidator.swift 파일이 추가되었습니다.
  • 금칙어 관리 시스템 도입: 시스템, 서비스, 비속어 등 금칙어를 체계적으로 정의하고 검사하는 로직을 담은 NicknameBannedWords.swift 파일이 추가되었습니다.
  • 세분화된 유효성 검사 결과 및 UI 피드백: NicknameTextFieldResultType 열거형이 확장되어 invalidLength, bannedWord 등 세분화된 유효성 검사 결과에 따라 구체적인 힌트 메시지, 텍스트 색상, 테두리 색상을 반환하도록 개선되었습니다.
  • Combine을 이용한 실시간 유효성 검사: SetNickNameViewController에 Combine 프레임워크가 도입되어 디바운스(debounced)가 적용된 실시간 닉네임 유효성 검사 및 UI 피드백 기능이 구현되었고, 기존의 수동 로직은 제거되었습니다.
  • UI 피드백 로직 업데이트: SetNickNameView의 UI 피드백 로직이 새로운 결과 타입과 테두리 색상을 사용하도록 업데이트되었으며, 불필요한 유효성 검사 메서드가 삭제되었습니다.
  • 닉네임 길이 요구사항 변경: TextLiteral.swift의 힌트 메시지가 변경된 닉네임 길이 요구사항(28자에서 216자)에 맞게 수정되었습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.


닉네임 새 규칙, 실시간 검증 흐름, 사용자 미소 짓네.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

이 PR은 닉네임 유효성 검사 시스템을 개선하고, 금지어 목록을 관리하며, 실시간 유효성 검사 및 UI 피드백 기능을 구현했습니다. 코드 변경 사항을 검토한 결과, 몇 가지 개선할 부분이 있습니다.

Comment on lines +30 to +37
static let profanityWords: [String] = [
"시발", "씨발", "ㅅㅂ",
"병신", "ㅂㅅ",
"개새끼", "ㄱㅅㄲ",
"존나", "ㅈㄴ",
"fuck", "shit", "bitch"
// 필요시 추가
]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

욕설/비속어 목록은 민감한 정보이므로, 앱 내에 직접 포함하는 것보다 서버에서 관리하고 주기적으로 업데이트하는 것이 좋습니다. 이렇게 하면 목록을 쉽게 수정하고 관리할 수 있으며, 앱 업데이트 없이도 변경 사항을 적용할 수 있습니다. 또한, 잠재적인 법적 문제로부터 앱을 보호할 수 있습니다.

서버에서 관리하는 것이 어렵다면, 최소한 암호화하여 저장하는 것을 고려해 보세요.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

임시로 넣어둔 항목으로 추후 변경될 예정입니다.

@Hrepay Hrepay merged commit a9915cd into develop Nov 6, 2025
@Hrepay Hrepay deleted the fix/#327 branch November 6, 2025 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] 닉네임 규칙 도입

3 participants