From cd1f273c704bf8f2c7b2b42c7327daa7d59c4ffc Mon Sep 17 00:00:00 2001 From: Barry Gitarts Date: Wed, 28 Aug 2019 11:13:59 -0400 Subject: [PATCH] additional field validation --- src/components/projects/CreateProject.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/projects/CreateProject.jsx b/src/components/projects/CreateProject.jsx index f2ac238..5fb2490 100644 --- a/src/components/projects/CreateProject.jsx +++ b/src/components/projects/CreateProject.jsx @@ -36,7 +36,8 @@ const validationSchema = Yup.object().shape({ title: Yup.string().max(20, TOO_LONG).required(REQUIRED), subtitle: Yup.string().max(120, TOO_LONG), creator: Yup.string().required(REQUIRED), - goal: Yup.number().required(REQUIRED).positive().integer() + goal: Yup.number().required(REQUIRED).positive().integer(), + goalToken: Yup.string().required(REQUIRED) }); const styles = theme => ({ @@ -297,7 +298,7 @@ const SubmissionSection = ({ classes, history }) => { name="creator" label="Contact Person" bottomLeftLabel="Name of the primary contact" - errorBorder={touched.title && errors.creator === REQUIRED} + errorBorder={touched.creator && errors.creator === REQUIRED} placeholder="Contract Person" onChange={handleChange} onBlur={handleBlur}