web / lib/services/schema-detection/utilities/validators
lib/services/schema-detection/utilities/validators
Statistical field validators for schema detection.
Provides validation functions that score how well a field’s statistics match a given field type (title, description, timestamp, location). Used by the pattern matching logic to combine name-based matching with data-driven confidence.
Functions
validateFieldType()
validateFieldType(
stats,fieldType,overrides?,customValidator?):number
Validates field statistics match the expected field type.
Parameters
stats
Field statistics to validate
fieldType
string
The field type to validate against
overrides?
Optional validator configuration overrides
customValidator?
(stats) => number
Optional function that fully replaces the built-in validator
Returns
number
Validation score from 0 (invalid) to 1 (perfect match)
Last updated on