Fix bug in validating ISBN 13s
This commit is contained in:
1 file changed
+1
-1
+1
-1
@@ -316,7 +316,7 @@ public static function validate_isbn(string $input):string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ISBN 13
|
// ISBN 13
|
||||||
if (\mb_strlen($input) === 10) {
|
if (\mb_strlen($input) === 13) {
|
||||||
|
|
||||||
if (\preg_match('/\d{13}/i', $input)) {
|
if (\preg_match('/\d{13}/i', $input)) {
|
||||||
return $input;
|
return $input;
|
||||||
|
|||||||
Reference in new issue
Block a user