fix(live-room): 유료 라이브 최소 30캔 검증을 추가한다
This commit is contained in:
@@ -688,6 +688,7 @@ enum I18n {
|
|||||||
static var enterTitle: String { pick(ko: "제목을 입력해 주세요.", en: "Please enter a title.", ja: "タイトルを入力してください。") }
|
static var enterTitle: String { pick(ko: "제목을 입력해 주세요.", en: "Please enter a title.", ja: "タイトルを入力してください。") }
|
||||||
static var enterNoticeMin5: String { pick(ko: "공지를 5자 이상 입력해주세요.", en: "Please enter at least 5 characters for the notice.", ja: "お知らせは5文字以上で入力してください。") }
|
static var enterNoticeMin5: String { pick(ko: "공지를 5자 이상 입력해주세요.", en: "Please enter at least 5 characters for the notice.", ja: "お知らせは5文字以上で入力してください。") }
|
||||||
static var enterPeopleRange: String { pick(ko: "인원을 3~999명 사이로 입력해주세요.", en: "Please enter the number of people between 3 and 999.", ja: "人数を3~999名の間で入力してください。") }
|
static var enterPeopleRange: String { pick(ko: "인원을 3~999명 사이로 입력해주세요.", en: "Please enter the number of people between 3 and 999.", ja: "人数を3~999名の間で入力してください。") }
|
||||||
|
static var enterPaidPriceMin30: String { pick(ko: "유료 라이브는 30캔 이상 설정해주세요.", en: "For paid live, set at least 30 cans.", ja: "有料ライブは30can以上で設定してください。") }
|
||||||
static var enterPassword6: String { pick(ko: "방 입장 비밀번호 6자리를 입력해 주세요.", en: "Please enter a 6-digit room entry password.", ja: "入室パスワード(6桁)を入力してください。") }
|
static var enterPassword6: String { pick(ko: "방 입장 비밀번호 6자리를 입력해 주세요.", en: "Please enter a 6-digit room entry password.", ja: "入室パスワード(6桁)を入力してください。") }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -354,6 +354,12 @@ final class LiveRoomCreateViewModel: ObservableObject {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if price > 0 && price < 30 {
|
||||||
|
self.errorMessage = I18n.CreateLive.enterPaidPriceMin30
|
||||||
|
self.isShowPopup = true
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
if roomType == .PRIVATE && (password.trimmingCharacters(in: .whitespaces).isEmpty || password.count != 6) {
|
if roomType == .PRIVATE && (password.trimmingCharacters(in: .whitespaces).isEmpty || password.count != 6) {
|
||||||
self.errorMessage = I18n.CreateLive.enterPassword6
|
self.errorMessage = I18n.CreateLive.enterPassword6
|
||||||
self.isShowPopup = true
|
self.isShowPopup = true
|
||||||
|
|||||||
15
docs/20260225_유료라이브최소30캔검증추가.md
Normal file
15
docs/20260225_유료라이브최소30캔검증추가.md
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
- [x] 유료 라이브 생성 시 최소 30캔 검증 로직 추가
|
||||||
|
- [x] 관련 다국어 메시지 추가 및 연결
|
||||||
|
- [x] 검증 실행 및 결과 기록
|
||||||
|
|
||||||
|
## 검증 기록
|
||||||
|
|
||||||
|
### 2026-02-25 유료 라이브 최소 30캔 검증 추가
|
||||||
|
- 무엇: 유료 라이브(가격 > 0) 생성 시 가격이 30캔 미만이면 생성을 차단하는 검증을 추가했다.
|
||||||
|
- 왜: 저가(30캔 미만) 유료 라이브 생성 방지를 위한 정책 검증을 생성 전 단계에서 강제하기 위함이다.
|
||||||
|
- 어떻게: `lsp_diagnostics`로 변경 파일(`SodaLive/Sources/Live/Room/Create/LiveRoomCreateViewModel.swift`, `SodaLive/Sources/I18n/I18n.swift`)을 점검했다.
|
||||||
|
- 결과: SourceKit 환경 한계로 `No such module 'UIKit'`, `Cannot find 'LanguageHeaderProvider' in scope` 진단이 발생했다.
|
||||||
|
- 어떻게: `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" -configuration Debug build`를 실행했다.
|
||||||
|
- 결과: `** BUILD SUCCEEDED **`.
|
||||||
|
- 어떻게: `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" test`를 실행했다.
|
||||||
|
- 결과: `Scheme SodaLive is not currently configured for the test action.`로 테스트 액션 미구성 상태를 확인했다.
|
||||||
Reference in New Issue
Block a user