tables.validatetable.md

June 23, 2023 ยท View on GitHub

Home > @datashaper/tables > validateTable

validateTable() function

Validates an entire table against a codebook's Field constraints.

Signature:

export declare function validateTable(table: ColumnTable, codebook: CodebookSchema, includeIndexes?: boolean): ValidationResult;

Parameters

ParameterTypeDescription
tableColumnTablethe table to validate
codebookCodebookSchemathe codebook to use
includeIndexesboolean(Optional) indicate whether to include the indexes of the rows that failed validation for each field

Returns:

ValidationResult