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