Procházet zdrojové kódy

Merge remote-tracking branch 'origin/main'

smiley před 3 měsíci
rodič
revize
9d18219e40
2 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 1 1
      src/Data/AlphaNum.php
  2. 1 1
      tests/Data/AlphaNumTest.php

+ 1 - 1
src/Data/AlphaNum.php

@@ -36,7 +36,7 @@ final class AlphaNum extends QRDataModeAbstract{
 	}
 
 	public static function validateString(string $string):bool{
-		return (bool)preg_match('/^[A-Z\d %$*+-.:\/]+$/', $string);
+		return (bool)preg_match('/^[A-Z\d %$*+\-.:\/]+$/', $string);
 	}
 
 	public function write(BitBuffer $bitBuffer, int $versionNumber):static{

+ 1 - 1
tests/Data/AlphaNumTest.php

@@ -35,7 +35,7 @@ final class AlphaNumTest extends DataInterfaceTestAbstract{
 			['ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 $%*+-./:', true],
 			['abc', false],
 			['ÄÖÜ', false],
-			[',', true],
+			[',', false],
 			['-', true],
 			['+', true],
 			['.', true],