Formify Docs

ISBN

Validate ISBN-10 and ISBN-13 book identifiers with checksum verification

ISBN

The isbn rule validates that a value is a valid ISBN-10 or ISBN-13, including real checksum verification.

Configuration

Config flagTypeDescription
isbnbooleanRequires a valid ISBN-10 or ISBN-13.
validationSchema: {
  book: { isbn: true },
}

With a custom message:

book: { isbn: "Enter a valid ISBN" }

V builder

import { V } from "formify-js";

V.isbn()
V.isbn("Enter a valid ISBN")

Default message

Must be a valid ISBN

Examples

ValueResult
0-306-40615-2✅ Valid (ISBN-10, checksum passes)
978-0-306-40615-7✅ Valid (ISBN-13, checksum passes)
0-306-40615-3❌ Invalid (checksum mismatch)

Things to know

  • Both formats are verified with their real checksum algorithms — a wrong final digit fails validation.
  • Dashes and spaces in the input are tolerated during parsing.
  • Empty values pass unless required: true is also set.

On this page