Skip to content
Snippets Groups Projects
Commit 2f3a641f authored by Ion Riciu's avatar Ion Riciu
Browse files

fix: adjust doi validation

parent 5f0c5dcc
No related branches found
No related tags found
No related merge requests found
...@@ -116,7 +116,7 @@ const composeValidate = ( ...@@ -116,7 +116,7 @@ const composeValidate = (
vld = [], vld = [],
valueField = {}, valueField = {},
fieldName, fieldName,
doiValidation = "false", doiValidation = false,
client, client,
) => value => { ) => value => {
const validator = vld || [] const validator = vld || []
...@@ -138,9 +138,7 @@ const composeValidate = ( ...@@ -138,9 +138,7 @@ const composeValidate = (
return validatorFn return validatorFn
}) })
if (errors.length === 0 && fieldName === 'submission.articleURL' && doiValidation === "true") { if (errors.length === 0 && fieldName === 'submission.articleURL' && doiValidation) {
console.log('element.doiValidation')
console.log(doiValidation)
return client return client
.query({ .query({
query: VALIDATE_DOI, query: VALIDATE_DOI,
...@@ -287,7 +285,7 @@ const FormTemplate = ({ ...@@ -287,7 +285,7 @@ const FormTemplate = ({
element.validate, element.validate,
element.validateValue, element.validateValue,
element.name, element.name,
element.DoiValidation, JSON.parse(element.DoiValidation ? element.DoiValidation : false),
client, client,
)} )}
values={values} values={values}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment