Documentation

Isbn
in package

Utility class for validating ISBN-10

Table of Contents

PATTERN  = '/^\d{9}[0-9X]$/'
checksum()  : string
ISBN-10 check digit
isValid()  : bool
Checks whether the provided number is a valid ISBN-10 number

Constants

PATTERN

public string PATTERN = '/^\d{9}[0-9X]$/'

ISBN-10 validation pattern

Methods

isValid()

Checks whether the provided number is a valid ISBN-10 number

public static isValid(string $isbn) : bool
Parameters
$isbn : string

ISBN to check

Return values
bool

Search results