Skip to content

Commit 9eeb2f5

Browse files
authored
Merge pull request #313 from eigan/patch-1
Do not use AlphaNum when string contains comma
2 parents 24d4e6f + 29cdbcc commit 9eeb2f5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Data/AlphaNum.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function getLengthInBits():int{
3636
}
3737

3838
public static function validateString(string $string):bool{
39-
return (bool)preg_match('/^[A-Z\d %$*+-.:\/]+$/', $string);
39+
return (bool)preg_match('/^[A-Z\d %$*+\-.:\/]+$/', $string);
4040
}
4141

4242
public function write(BitBuffer $bitBuffer, int $versionNumber):static{

tests/Data/AlphaNumTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public static function stringValidateProvider():array{
3535
['ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 $%*+-./:', true],
3636
['abc', false],
3737
['ÄÖÜ', false],
38-
[',', true],
38+
[',', false],
3939
['-', true],
4040
['+', true],
4141
['.', true],

0 commit comments

Comments
 (0)