Skip to content

Commit

Permalink
Show error message when the card brand is invalid.
Browse files Browse the repository at this point in the history
  • Loading branch information
yatatsu committed Dec 17, 2024
1 parent 0aed8de commit 8f14067
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Views/CardFormViewViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ class CardFormViewViewModel: CardFormViewViewModelType {
// 利用可能ブランドのチェック
if let acceptedCardBrands = self.acceptedCardBrands {
if cardNumberInput.brand != .unknown && !acceptedCardBrands.contains(cardNumberInput.brand) {
return .failure(.cardNumberInvalidError(value: cardNumberInput, isInstant: false))
return .failure(.cardNumberInvalidBrandError(value: cardNumberInput, isInstant: true))
}
}
// 桁数チェック
Expand Down

0 comments on commit 8f14067

Please sign in to comment.