Commit 457eb2db authored by nickstiffler's avatar nickstiffler Committed by Yannis Barlas

feat(submission form): make suggested reviewer required

parent 867629db
......@@ -579,7 +579,7 @@ const initialValidations = {
// val => stripHTML(val).length > 0,
// ),
suggestedReviewer: yup.object().shape({
name: yup.string(),
name: yup.string().required('Please suggest a reviewer'),
// .test(
// 'is suggested reviewer valid',
// 'Must be a registered WormBase Person',
......
......@@ -374,14 +374,16 @@ const InitialSubmission = props => {
onChange={e =>
onAutocompleteChange(
e,
'laboratory.name',
'suggestedReviewer.name',
setFieldValue,
handleChange,
)
}
onSuggestionSelected={onSuggestionSelected}
placeholder="Please suggest a reviewer (optional)"
placeholder="Please suggest a reviewer"
required
setFieldValue={setFieldValue}
touched={touched}
value={get(values, 'suggestedReviewer.name')}
/>
......
Markdown is supported
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