diff --git a/webapp/components/Group/GroupForm.vue b/webapp/components/Group/GroupForm.vue index c086053eb..2409c6370 100644 --- a/webapp/components/Group/GroupForm.vue +++ b/webapp/components/Group/GroupForm.vue @@ -9,164 +9,162 @@ > @@ -227,10 +225,20 @@ export default { formSchema: { name: { required: true, min: NAME_LENGTH_MIN, max: NAME_LENGTH_MAX }, slug: { required: false, min: NAME_LENGTH_MIN }, - groupType: { required: true }, + groupType: { required: true, min: 1 }, about: { required: false }, - description: { required: true, min: DESCRIPTION_WITHOUT_HTML_LENGTH_MIN }, - actionRadius: { required: true }, + description: { + type: 'string', + required: true, + min: DESCRIPTION_WITHOUT_HTML_LENGTH_MIN, + validator: (_, value = '') => { + if (this.$filters.removeHtml(value).length < this.formSchema.description.min) { + return [new Error()] + } + return [] + }, + }, + actionRadius: { required: true, min: 1 }, locationName: { required: false }, categoryIds: { type: 'array', @@ -254,11 +262,11 @@ export default { }, }, methods: { - changeGroupType(e) { - this.formData.groupType = e.target.value + changeGroupType(event) { + this.formData.groupType = event.target.value }, - changeActionRadius(e) { - this.formData.actionRadius = e.target.value + changeActionRadius(event) { + this.formData.actionRadius = event.target.value }, updateEditorDescription(value) { this.$refs.groupForm.update('description', value) @@ -329,6 +337,7 @@ export default { -moz-appearance: auto; appearance: auto; } + .select-label { margin-bottom: 0; padding-bottom: 4px; @@ -340,7 +349,7 @@ export default { padding-bottom: 14px; } -.group-form > .base-card { +.group-form { display: flex; flex-direction: column;