Validations allow you to provide error or warning messages to users when data is improperly formatted.
onValidateRecord
hook on your importer.
onValidateRecord(record)
onValidationRecord
hook is called for each row (record) in the importer. It allows you to display front-end validations in the importer for the user to fix.
The record
object passed to onValidateRecord
contains all of the values for a single row in the importer. You can access values in the record object using the internal_key
of each column in your importer.
The onValidateRecord
hook returns an errors object with two properties:
errors
block the user from submitting an import. These are items that must be fixed.warnings
provide a warning message to the user about potential issues. However, a user can submit an import with warnings present.