Merge pull request #1641 from Human-Connection/1639_no_limits_for_post_length

Fix #1639 - No limits for post length
This commit is contained in:
mattwr18 2019-09-19 09:16:57 +02:00 committed by GitHub
commit f3c44711e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,7 +21,7 @@
:hashtags="hashtags"
@input="updateEditorContent"
/>
<small class="smallTag">{{ form.contentLength }}/{{ contentMax }}</small>
<small class="smallTag">{{ form.contentLength }}</small>
</client-only>
<ds-space margin-bottom="small" />
<hc-categories-select
@ -112,7 +112,6 @@ export default {
slug: null,
users: [],
contentMin: 3,
contentMax: 2000,
failsValidations: true,
hashtags: [],
}
@ -223,8 +222,7 @@ export default {
return categoryIds
},
validatePost() {
const passesContentValidations =
this.form.contentLength >= this.contentMin && this.form.contentLength <= this.contentMax
const passesContentValidations = this.form.contentLength >= this.contentMin
const passesCategoryValidations =
this.form.categoryIds.length > 0 && this.form.categoryIds.length <= 3
this.failsValidations = !(passesContentValidations && passesCategoryValidations)