jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/362468 )
Change subject: Allow CUIT for Argentina ...................................................................... Allow CUIT for Argentina We'd only been accepting the 7-10 digit DNI numbers, but d*Local also accepts 11 digit CUIT numbers Change-Id: Ia02722b057d8985bbc004e07928a9a71243ede72 --- M gateway_common/FiscalNumber.php M tests/phpunit/DataValidatorTest.php 2 files changed, 3 insertions(+), 1 deletion(-) Approvals: Mepps: Looks good to me, approved jenkins-bot: Verified diff --git a/gateway_common/FiscalNumber.php b/gateway_common/FiscalNumber.php index e817775..05e4d57 100644 --- a/gateway_common/FiscalNumber.php +++ b/gateway_common/FiscalNumber.php @@ -10,10 +10,11 @@ protected static $key = 'fiscal_number'; protected static $countryRules = array( + // Argentina's DNI numbers have 7-10 digits and CUIT numbers have 11 'AR' => array( 'numeric' => true, 'min' => 7, - 'max' => 10, + 'max' => 11, ), 'BR' => array( 'numeric' => true, diff --git a/tests/phpunit/DataValidatorTest.php b/tests/phpunit/DataValidatorTest.php index d44f5bb..c02dfec 100644 --- a/tests/phpunit/DataValidatorTest.php +++ b/tests/phpunit/DataValidatorTest.php @@ -127,6 +127,7 @@ array( 'CO', '1234-5678-901', false ), array( 'AR', 'ABC12312', false ), array( 'AR', '12341234', true ), + array( 'AR', '12-34123412-1', true ), // 11 digit CUIT should pass array( 'AR', '1112223', true ), array( 'AR', '111222', false ), array( 'MX', '', true ), // Not required for MX -- To view, visit https://gerrit.wikimedia.org/r/362468 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia02722b057d8985bbc004e07928a9a71243ede72 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Ejegg <ej...@ejegg.com> Gerrit-Reviewer: Mepps <me...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits