From b76354d95d23562e832f0a3ffe3d36aa94430bbb Mon Sep 17 00:00:00 2001 From: ogerly Date: Thu, 7 Nov 2019 09:12:13 +0100 Subject: [PATCH] 2119-Fix consistent form input validation --- .../ContributionForm/ContributionForm.vue | 59 +++++++++++++++++-- 1 file changed, 53 insertions(+), 6 deletions(-) diff --git a/webapp/components/ContributionForm/ContributionForm.vue b/webapp/components/ContributionForm/ContributionForm.vue index eb849c71f..e27730584 100644 --- a/webapp/components/ContributionForm/ContributionForm.vue +++ b/webapp/components/ContributionForm/ContributionForm.vue @@ -21,7 +21,26 @@ name="title" autofocus /> - {{ form.title.length }}/{{ formSchema.title.max }} + + + {{ form.title.length }}/{{ formSchema.title.max }} + + + + {{ form.title.length }}/{{ formSchema.title.max }} + + + + {{ form.title.length }}/{{ formSchema.title.max }} + + + + - {{ form.contentLength }} + + {{ form.contentLength }} + + + + + + + @@ -113,7 +156,7 @@ export default { }, formSchema: { title: { required: true, min: 3, max: 100 }, - content: [{ required: true }], + content: { required: true, min: 3 }, }, id: null, loading: false, @@ -204,9 +247,7 @@ export default { this.manageContent(value) }, manageContent(content) { - // filter HTML out of content value - const str = content.replace(/<\/?[^>]+(>|$)/gm, '') - // Set counter length of text + let str = content.replace(/<\/?[^>]+(>|$)/gm, '') this.form.contentLength = str.length this.validatePost() }, @@ -288,4 +329,10 @@ export default { padding-right: 0; } } +.checkicon { + top: -18px; +} +.checkicon_cat { + top: -38px; +}