File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ public function getLengthInBits():int{
36
36
}
37
37
38
38
public static function validateString (string $ string ):bool {
39
- return (bool )preg_match ('#^[ ' . self :: CHAR_MAP . ' ]+$# ' , $ string );
39
+ return (bool )preg_match ('/^[A-Z\d %$*+-.:\/ ]+$/ ' , $ string );
40
40
}
41
41
42
42
public function write (BitBuffer $ bitBuffer , int $ versionNumber ):static {
Original file line number Diff line number Diff line change @@ -34,6 +34,15 @@ public static function stringValidateProvider():array{
34
34
return [
35
35
['ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 $%*+-./: ' , true ],
36
36
['abc ' , false ],
37
+ ['ÄÖÜ ' , false ],
38
+ [', ' , true ],
39
+ ['- ' , true ],
40
+ ['+ ' , true ],
41
+ ['. ' , true ],
42
+ ['* ' , true ],
43
+ [': ' , true ],
44
+ ['/ ' , true ],
45
+ ['\\' , false ],
37
46
];
38
47
}
39
48
You can’t perform that action at this time.
0 commit comments