Skip to content

Commit c60a7ae

Browse files
committed
fix material_used and category issues
1 parent 81a6269 commit c60a7ae

File tree

1 file changed

+2
-15
lines changed
  • zubhub_frontend/zubhub/src/views/create_project

1 file changed

+2
-15
lines changed

zubhub_frontend/zubhub/src/views/create_project/script.js

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -693,21 +693,8 @@ export const validationSchema = Yup.object().shape({
693693
// ? false
694694
// : true;
695695
// }),
696-
materials_used: Yup.string()
697-
.max(10000, 'max')
698-
.test('empty', 'required', value => {
699-
let is_empty = true;
700-
701-
value &&
702-
value.split(',').forEach(material => {
703-
if (material) {
704-
is_empty = false;
705-
}
706-
});
707-
708-
return !is_empty;
709-
}),
710-
category: Yup.string(),
696+
materials_used: Yup.array().required('required'),
697+
category: Yup.array(),
711698
// tags: Yup.mixed().test('unsupported', 'unsupported', tags => {
712699
// if (tags) {
713700
// tags = JSON.parse(tags);

0 commit comments

Comments
 (0)