diff --git a/packages/server/src/arpa_reporter/services/validate-upload.js b/packages/server/src/arpa_reporter/services/validate-upload.js index d795e00b8..e049aad7b 100644 --- a/packages/server/src/arpa_reporter/services/validate-upload.js +++ b/packages/server/src/arpa_reporter/services/validate-upload.js @@ -326,9 +326,9 @@ async function validateRecord({ upload, record, typeRules: rules }) { const lcItems = rule.listVals.map((val) => multiselect(val.toLowerCase())); // for pick lists, the value must be one of possible values - if (rule.dataType === 'Pick List' && !lcItems.includes(value)) { + if (rule.dataType === 'Pick List' && !lcItems.includes(multiselect(value))) { errors.push(new ValidationError( - `Value for ${key} ('${value}') must be one of ${lcItems.length} options in the input template`, + `Value for ${key} ('${value}') must be one of ${lcItems.length} valid options in the input template. (${JSON.stringify(lcItems)})`, { col: rule.columnName, severity: 'err' }, )); } @@ -339,7 +339,7 @@ async function validateRecord({ upload, record, typeRules: rules }) { for (const entry of entries) { if (!lcItems.includes(entry)) { errors.push(new ValidationError( - `Entry '${entry}' of ${key} is not one of ${lcItems.length} valid options`, + `Entry '${entry}' of ${key} is not one of ${lcItems.length} valid options (${JSON.stringify(lcItems)})`, { col: rule.columnName, severity: 'err' }, )); }