Fix bug in validating ISBN 13s

This commit is contained in:
jrenslin committed 2022-03-11 23:31:41 +01:00
1 parent 589161219f
commit 9507387c8a
1 file changed
+1 -1
+1 -1
View File
@@ -316,7 +316,7 @@ public static function validate_isbn(string $input):string {
}
// ISBN 13
if (\mb_strlen($input) === 10) {
if (\mb_strlen($input) === 13) {
if (\preg_match('/\d{13}/i', $input)) {
return $input;