mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Disable local card number validation.
Some cards are reported invalid there that are valid.
This commit is contained in:
parent
2f1c674401
commit
ed9ba07a32
1 changed files with 6 additions and 5 deletions
|
@ -193,11 +193,12 @@ CardValidationResult ValidateCard(const QString &number) {
|
|||
}
|
||||
const auto range = MostSpecificBinRangeForNumber(sanitized);
|
||||
const auto brand = range.brand;
|
||||
if (sanitized.size() > range.length) {
|
||||
return { .state = ValidationState::Invalid, .brand = brand };
|
||||
} else if (sanitized.size() < range.length) {
|
||||
return { .state = ValidationState::Incomplete, .brand = brand };
|
||||
} else if (!IsValidLuhn(sanitized)) {
|
||||
//if (sanitized.size() > range.length) {
|
||||
// return { .state = ValidationState::Invalid, .brand = brand };
|
||||
//} else if (sanitized.size() < range.length) {
|
||||
// return { .state = ValidationState::Incomplete, .brand = brand };
|
||||
//} else
|
||||
if (!IsValidLuhn(sanitized)) {
|
||||
return { .state = ValidationState::Invalid, .brand = brand };
|
||||
}
|
||||
return {
|
||||
|
|
Loading…
Add table
Reference in a new issue