Skip to content

fix: enforce signup input constraints - #16

Merged
ccjngwn merged 1 commit into
developfrom
fix/signup-validation-constraints
Jul 10, 2026
Merged

fix: enforce signup input constraints#16
ccjngwn merged 1 commit into
developfrom
fix/signup-validation-constraints

Conversation

@ccjngwn

@ccjngwn ccjngwn commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • Tightened signup validation to match the UI constraints: nickname, login ID, and password are all required.
  • Restricted nickname to Korean/English/numeric characters up to 10 chars.
  • Restricted login ID to lowercase English letters and numbers, 4-20 chars.
  • Required passwords to be 8-20 chars and include English letters, numbers, and special characters.
  • Updated API docs/examples and test fixtures to use valid login IDs.
  • Added Bean Validation tests for the signup request constraints.

Why

The server-side signup validation was looser than the UI policy, so invalid values could still pass if sent directly to the API.

Validation

  • ./gradlew test

Summary by CodeRabbit

  • New Features
    • Updated signup requirements: IDs use lowercase letters and digits, passwords require 8–20 characters with letters, numbers, and special characters, and nicknames support Korean/English letters and numbers up to 10 characters.
  • Documentation
    • Updated API examples and validation descriptions to reflect the current signup and login formats.
  • Tests
    • Added comprehensive signup validation coverage.
    • Updated integration test data to comply with the revised login ID format.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0bf66c6d-9df0-425f-8916-e3b8f499c1f2

📥 Commits

Reviewing files that changed from the base of the PR and between 703aad8 and 26b95c3.

📒 Files selected for processing (9)
  • README.md
  • src/main/java/com/cotato/cokerthon/domain/auth/controller/AuthController.java
  • src/main/java/com/cotato/cokerthon/domain/auth/dto/request/LoginRequest.java
  • src/main/java/com/cotato/cokerthon/domain/auth/dto/request/SignupRequest.java
  • src/main/java/com/cotato/cokerthon/domain/member/dto/response/MemberResponse.java
  • src/test/java/com/cotato/cokerthon/domain/auth/dto/request/SignupRequestValidationTest.java
  • src/test/java/com/cotato/cokerthon/domain/companion/CompanionIntegrationTest.java
  • src/test/java/com/cotato/cokerthon/domain/member/MemberIntegrationTest.java
  • src/test/java/com/cotato/cokerthon/domain/sleep/SleepJetlagIntegrationTest.java

📝 Walkthrough

Walkthrough

Signup validation rules were revised for IDs, passwords, and nicknames. API examples and documentation were updated, validation tests were added, and integration-test credentials were changed to match the new ID format.

Changes

Signup validation and identifier examples

Layer / File(s) Summary
Signup validation constraints
src/main/java/com/cotato/cokerthon/domain/auth/dto/request/SignupRequest.java
ID validation now permits lowercase letters and digits, passwords require 8–20 characters with letters, digits, and special characters, and nicknames allow Korean, letters, and digits up to 10 characters.
API documentation examples
src/main/java/com/cotato/cokerthon/domain/auth/controller/AuthController.java, src/main/java/com/cotato/cokerthon/domain/auth/dto/request/LoginRequest.java, src/main/java/com/cotato/cokerthon/domain/member/dto/response/MemberResponse.java, README.md
Swagger descriptions and request/response examples now use the revised validation rules and identifier examples without underscores.
Validation tests and integration fixtures
src/test/java/com/cotato/cokerthon/domain/auth/dto/request/SignupRequestValidationTest.java, src/test/java/com/cotato/cokerthon/domain/{companion,member,sleep}/*IntegrationTest.java
Signup constraint coverage was added, and integration-test login IDs were changed to lowercase alphanumeric values while preserving existing flows and assertions.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/signup-validation-constraints

Comment @coderabbitai help to get the list of available commands.

@ccjngwn ccjngwn changed the title fix(auth): enforce signup input constraints fix: enforce signup input constraints Jul 10, 2026
@ccjngwn
ccjngwn marked this pull request as ready for review July 10, 2026 20:54
@ccjngwn
ccjngwn merged commit 9d5225f into develop Jul 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant