크리에이터 커뮤니티 게시물
- 이미지가 없어도 등록할 수 있도록 수정 - 유효성 검사 추가 - 크리에이터 채널 - 게시물 높이가 같을 수 있도록 이미지가 없으면 Rectangle 추가
This commit is contained in:
@@ -45,11 +45,6 @@ final class CreatorCommunityWriteViewModel: ObservableObject {
|
||||
fileName: "\(UUID().uuidString)_\(Date().timeIntervalSince1970 * 1000).jpg",
|
||||
mimeType: "image/*")
|
||||
)
|
||||
} else {
|
||||
errorMessage = "이미지를 업로드 하지 못했습니다.\n다시 선택해 주세요"
|
||||
isShowPopup = true
|
||||
isLoading = false
|
||||
return
|
||||
}
|
||||
|
||||
multipartData.append(MultipartFormData(provider: .data(jsonData), name: "request"))
|
||||
@@ -103,6 +98,12 @@ final class CreatorCommunityWriteViewModel: ObservableObject {
|
||||
}
|
||||
|
||||
private func validateData() -> Bool {
|
||||
if content.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty || content.count < 5 {
|
||||
errorMessage = "내용을 5자 이상 입력해 주세요."
|
||||
isShowPopup = true
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user