Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Helpers/Validate.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public static function isValidCns($cns)

$first = (int) $cns[0];

if (in_array($first, [7, 8, 9])) {
if (in_array($first, [5, 7, 8, 9])) {
return Validate::validate_cns_tmp($cns);
}

Expand Down
5 changes: 5 additions & 0 deletions tests/Helpers/ValidateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ public function cnsProvider()
['796 3683 5437 0018', true],
['796 3683 54370018', true],
['7963683 54370018', true],
['550354737380003', true],
['521473152170018', true],
['503521996570006', false],
['556492895730003', false],
['584480646290007', false],
['696368354370018', false],
['7963683543700120', false],
['', false],
Expand Down