From 58a63d3ccd48c787e9a23725045f0d2f629d3d60 Mon Sep 17 00:00:00 2001 From: Bogdan Cochior <bogdan.cochior@thinslices.com> Date: Thu, 15 Mar 2018 14:27:52 +0200 Subject: [PATCH] fix(submission): change validation for required files --- packages/xpub-faraday/app/config/journal/wizard-validators.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/xpub-faraday/app/config/journal/wizard-validators.js b/packages/xpub-faraday/app/config/journal/wizard-validators.js index 8504e61f0..bec3371d1 100644 --- a/packages/xpub-faraday/app/config/journal/wizard-validators.js +++ b/packages/xpub-faraday/app/config/journal/wizard-validators.js @@ -30,9 +30,9 @@ export const editModeEnabled = value => { return undefined } -export const requiredFiles = (valus, formValues) => { +export const requiredFiles = (values, formValues) => { const manuscripts = get(formValues, 'files.manuscripts') - if (manuscripts && manuscripts.length === 0) { + if (!manuscripts || manuscripts.length === 0) { return 'At least one main manuscript file is needed.' } return undefined -- GitLab