Skip to content

Commit

Permalink
Revert "simple new method added for validating sort codes."
Browse files Browse the repository at this point in the history
This reverts commit 23da720.
  • Loading branch information
kenguest committed Jan 22, 2013
1 parent 23da720 commit 01a592c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 63 deletions.
17 changes: 0 additions & 17 deletions Validate/IE.php
Original file line number Diff line number Diff line change
Expand Up @@ -367,23 +367,6 @@ function licensePlate($number)
}
}
// }}}

// {{{ public function sortCode

/**
* Validate a sort code, no dashes or whitespace - just digits.
*
* @param string $sc The sort code.
*
* @access public
* @return bool
*/
function sortCode($sc)
{
// 6 digits expected - starting with a '9'.
return (preg_match('/^9[0-9]{5}$/', $sc)) ? true : false;
}
// }}}
// {{{ public function bankAC
/**
* Validate a bank account number
Expand Down
8 changes: 4 additions & 4 deletions tests/validate_IE_bankAC.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ $sort_codes = array(
'123456789', //NOK - too many digits
'1234567', //NOK - too few digits;
);
echo "\nTest bank accounts prefixed with sort codes\n";
echo "\nTest bank accounts\n";
foreach ($ACs as $AC) {
echo "{$AC}: ".$noYes[Validate_IE::bankAC($AC)]."\n";
}
echo "\nTest bank accounts\n";
echo "\nTest sort codes\n";
foreach ($sort_codes as $sort_code) {
echo "{$sort_code}: ".$noYes[Validate_IE::bankAC($sort_code, true)]."\n";
}
Expand All @@ -38,13 +38,13 @@ exit(0);
Test Validate_IE
****************

Test bank accounts prefixed with sort codes
Test bank accounts
12345678901234: YES
A2345678901234: NO
123456789012345: NO
12C4567890123: NO

Test bank accounts
Test sort codes
12345678: YES
A2345678: NO
123456789: NO
Expand Down
42 changes: 0 additions & 42 deletions tests/validate_IE_sortCode.phpt

This file was deleted.

0 comments on commit 01a592c

Please sign in to comment.