imports/vx/both/code/vxapp.js
/**
     * Validate all of the paths in the header row to ensure that the are properly represented in the
     * import schema.
     *
     * @param {object} importSchema Import schema.
     * @param {array} headerArray Array of columns of first row.
     * @param {array} messages Array of messages.
     * @param {string} fieldIdKey i18n bundle key of field-identifier message.
     */
Validate all of the paths in the header row to ensure that the are properly represented in the
import schema.

@param {object} importSchema Import schema.
@param {array} headerArray Array of columns of first row.
@param {array} messages Array of messages.
@param {string} fieldIdKey i18n bundle key of field-identifier message.
Validate all of the paths in the header row to ensure that the are properly represented in the import schema . @param { object } importSchema Import schema . @param { array } headerArray Array of columns of first row . @param { array } messages Array of messages . @param { string } fieldIdKey i18n bundle key of field - identifier message .
validatePaths(importSchema, headerArray, messages, fieldIdKey) {
        let valid = true
        headerArray.forEach((path) => {
            if (path === "command") {
                return
            }
            const importSchemaPath = RecordImporter.importSchemaPath(path)
            const definition = get(importSchema, importSchemaPath)
            if (!(definition && VXApp.isDefinition(definition))) {
                valid = false
                const message = {}
                message.index = 0
                message.fieldIdKey = fieldIdKey
                message.fieldIdVariables = { path: path }
                message.result = { success : false, icon : "TRIANGLE", key : "common.invalid_header_path" }
                messages.push(message)
            }
        })
        return valid
    }
validatePaths ( importSchema , headerArray , messages , fieldIdKey ) { let valid = true headerArray . forEach ( ( path ) => { if ( path === "command" ) { return } const importSchemaPath = RecordImporter . importSchemaPath ( path ) const definition = get ( importSchema , importSchemaPath ) if ( ! ( definition && VXApp . isDefinition ( definition ) ) ) { valid = false const message = { } message . index = 0 message . fieldIdKey = fieldIdKey message . fieldIdVariables = { path : path } message . result = { success : false , icon : "TRIANGLE" , key : "common.invalid_header_path" } messages . push ( message ) } } ) return valid }
Validate all of the paths in the header row to ensure that the are properly represented in the
 import schema.
Validate all of the paths in the header row to ensure that the are properly represented in the import schema .