A Flatfile plugin that validates and formats International Standard Book Number (ISBN) data during the import process, supporting both ISBN-10 and ISBN-13 standards with automatic formatting and conversion capabilities.
sheetSlug
string
'**'
'**'
applies it to all sheets in the workspace.isbnFields
string[]
['isbn']
autoFormat
boolean
true
format
string
(optional)undefined
'isbn13'
, 'isbn13h'
(with hyphens), 'isbn10'
, and 'isbn10h'
(with hyphens).sheetSlug
in the configuration exactly matches the slug of the target sheet in your Flatfile Space.isbnFields
array match the field keys in your sheet’s data model.npm install @flatfile/plugin-validate-isbn
) and imported.format
option is explicitly set.
isbn3
library, which handles the core validation and conversion logic. The plugin operates using recordHook
, which is triggered by the commit:created
event. This means validation runs after a user submits their data but before the commit is finalized.
record.addError(field, message)
to attach a blocking error to the specific field.record.addInfo(field, message)
to provide non-blocking feedback to the user.