File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
wp1-frontend/src/components Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 109109 v-on:input =" validateInput('longDescription', maxLongDescriptionLength)"
110110 rows =" 6"
111111 class =" form-control"
112- :class =" {'is-invalid': isLongDescriptionInvalid }"
112+ :class =" {'is-invalid': !isLongDescriptionValid }"
113113 placeholder =" ZIM file created from a WP1 Selection"
114114 ></textarea >
115115 <small class =" form-text" :class =" {'text-muted': graphemeCount(longDescription) < maxLongDescriptionLength, 'text-warning': graphemeCount(longDescription) === maxLongDescriptionLength}" >
@@ -345,15 +345,15 @@ export default {
345345 this.status === 'ENDED'
346346 );
347347 },
348- isLongDescriptionInvalid : function() {
349- if (!this.longDescription || !this.description) return false ;
348+ isLongDescriptionValid : function() {
349+ if (!this.longDescription || !this.description) return true ;
350350 const longCount = this.graphemeCount(this.longDescription);
351351 const descCount = this.graphemeCount(this.description);
352- return longCount < descCount || this.longDescription = == this.description;
352+ return longCount >= descCount && this.longDescription ! == this.description;
353353 },
354354 hasLengthErrors: function() {
355355 // Prevent empty required fields and invalid long description
356- return !this.zimTitle || !this.description || this.isLongDescriptionInvalid ;
356+ return !this.zimTitle || !this.description || ! this.isLongDescriptionValid ;
357357 }
358358 },
359359 watch: {
You can’t perform that action at this time.
0 commit comments