diff --git a/webapp/components/Group/GroupForm.vue b/webapp/components/Group/GroupForm.vue index 149ed2ec3..f28fede12 100644 --- a/webapp/components/Group/GroupForm.vue +++ b/webapp/components/Group/GroupForm.vue @@ -193,6 +193,7 @@ import { CATEGORIES_MIN, CATEGORIES_MAX } from '~/constants/categories.js' import { NAME_LENGTH_MIN, NAME_LENGTH_MAX, + GOAL_LENGTH_MIN, DESCRIPTION_WITHOUT_HTML_LENGTH_MIN, } from '~/constants/groups.js' import HcEditor from '~/components/Editor/Editor' @@ -243,7 +244,7 @@ export default { name: { required: true, min: NAME_LENGTH_MIN, max: NAME_LENGTH_MAX }, slug: { required: false }, groupType: { required: true }, - goal: { required: true, min: NAME_LENGTH_MIN }, + goal: { required: true, min: GOAL_LENGTH_MIN }, description: { required: true, min: DESCRIPTION_WITHOUT_HTML_LENGTH_MIN }, actionRadius: { required: true }, locationName: { required: false }, @@ -271,7 +272,7 @@ export default { return ( this.formData.name.length < this.formSchema.name.min || this.formData.groupType === '' || - this.formData.goal.length > this.formSchema.goal.max || // not mandatory + this.formData.goal.length < this.formSchema.goal.min || // not mandatory this.descriptionLength < this.formSchema.description.min || this.formData.actionRadius === '' || // this.formData.locationName === '' || // not mandatory diff --git a/webapp/constants/groups.js b/webapp/constants/groups.js index 1c49d3ff3..cfc241ff5 100644 --- a/webapp/constants/groups.js +++ b/webapp/constants/groups.js @@ -1,5 +1,6 @@ // this file is duplicated in `backend/src/constants/group.js` and `webapp/constants/group.js` export const NAME_LENGTH_MIN = 3 export const NAME_LENGTH_MAX = 50 +export const GOAL_LENGTH_MIN = 3 export const DESCRIPTION_WITHOUT_HTML_LENGTH_MIN = 100 // with removed HTML tags export const SHOW_GROUP_BUTTON_IN_HEADER = true