1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

validation fix

This commit is contained in:
Matthias Kretschmann 2020-07-13 13:02:17 +02:00
parent 97df7fbe1a
commit 40e5144b06
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -22,7 +22,7 @@ const validationSchema = Yup.object().shape<MetaDataPublishForm>({
name: Yup.string().required('Required'), name: Yup.string().required('Required'),
author: Yup.string().required('Required'), author: Yup.string().required('Required'),
price: Yup.string().required('Required'), price: Yup.string().required('Required'),
files: Yup.object<File[]>().required('Required'), files: Yup.array<File>().required('Required'),
description: Yup.string().required('Required'), description: Yup.string().required('Required'),
license: Yup.string().required('Required'), license: Yup.string().required('Required'),
access: Yup.string().required('Required'), access: Yup.string().required('Required'),
@ -111,7 +111,7 @@ export default function PublishForm({
{({ isSubmitting, isValid, status, setStatus }) => ( {({ isSubmitting, isValid, status, setStatus }) => (
<FormFormik <FormFormik
className={styles.form} className={styles.form}
// onChange={() => status === 'empty' && setStatus(null)} onChange={() => status === 'empty' && setStatus(null)}
> >
{content.data.map((field: FormFieldProps) => ( {content.data.map((field: FormFieldProps) => (
<Field key={field.name} {...field} component={Input} /> <Field key={field.name} {...field} component={Input} />