mirror of
https://github.com/Respect/Validation.git
synced 2024-06-01 13:22:24 +02:00
General fixes for PR#1392 (rupay card validation)
This commit is contained in:
parent
8e345b798a
commit
2951dfd342
|
@ -19,6 +19,7 @@
|
|||
- Added ignores for phpstan template variables without getters.
|
||||
- Fixed misc phpstan and phpcs errors.
|
||||
- v::dateTime('z') is not supported anymore in PHP8, and should not be relied upon
|
||||
- Added RuPay card validation (thanks @rakshit087)
|
||||
|
||||
# Changes in Respect\Validation 1.0
|
||||
|
||||
|
|
|
@ -103,4 +103,4 @@ final class CreditCard extends AbstractRule
|
|||
|
||||
return preg_match(self::BRAND_REGEX_LIST[$this->brand], $input) > 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ final class CreditCardTest extends RuleTestCase
|
|||
public function itShouldThrowExceptionWhenCreditCardBrandIsNotValid(): void
|
||||
{
|
||||
$message = '"RespectCard" is not a valid credit card brand';
|
||||
$message .= ' (Available: Any, American Express, Diners Club, Discover, JCB, MasterCard, Visa)';
|
||||
$message .= ' (Available: Any, American Express, Diners Club, Discover, JCB, MasterCard, Visa, RuPay)';
|
||||
|
||||
$this->expectException(ComponentException::class);
|
||||
$this->expectExceptionMessage($message);
|
||||
|
@ -108,4 +108,4 @@ final class CreditCardTest extends RuleTestCase
|
|||
[$jcb, '38520000023237'], // Diners Club
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue