Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/287117
Change subject: Fix CO fiscal number validation rules (again) ...................................................................... Fix CO fiscal number validation rules (again) Regressed when I picked up an out of date patch moving the rules to another file. Adds tests to prevent another regression. Change-Id: Ic1814af9a5eb41f332919c72d2ea16d678db3ded --- M gateway_common/FiscalNumber.php M tests/DataValidatorTest.php 2 files changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/17/287117/1 diff --git a/gateway_common/FiscalNumber.php b/gateway_common/FiscalNumber.php index e409038..7b8b626 100644 --- a/gateway_common/FiscalNumber.php +++ b/gateway_common/FiscalNumber.php @@ -22,8 +22,8 @@ ), 'CO' => array( 'numeric' => true, - 'min' => 11, - 'max' => 14, + 'min' => 6, + 'max' => 10, ), 'CL' => array( 'min' => 8, diff --git a/tests/DataValidatorTest.php b/tests/DataValidatorTest.php index 0a2ecb3..2c6c3f7 100644 --- a/tests/DataValidatorTest.php +++ b/tests/DataValidatorTest.php @@ -121,6 +121,10 @@ array( 'BR', 'ABC11122233', false ), array( 'CL', '12.123.123-K', true ), array( 'CL', '12.12.12-4', false ), + array( 'CO', '123-456', true ), + array( 'CO', '1234-5678-90', true ), + array( 'CO', '12A-456-7', false ), + array( 'CO', '1234-5678-901', false ), array( 'AR', 'ABC12312', false ), array( 'AR', '12341234', true ), array( 'AR', '1112223', true ), -- To view, visit https://gerrit.wikimedia.org/r/287117 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic1814af9a5eb41f332919c72d2ea16d678db3ded Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Ejegg <eeggles...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits