Function Hook_fields_isbn->is_valid_isbn

Definitions

sources/hooks/systems/fields/isbn.php

  • Check if a provided code is valid ISBN-10 or ISBN-13.
  • Visibility: protected
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: bool

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$isbn string No No required parameter N/A N/A The ISBN code to check

Returns

  • Whether the ISBN code is valid
  • Type: boolean
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Check if a provided code is valid ISBN-10 or ISBN-13.
 *
 * @param  string $isbn The ISBN code to check
 * @return boolean Whether the ISBN code is valid
 */

protected function is_valid_isbn(string $isbn) : bool