0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-10 04:12:53 +01:00

improved code structure

Dieser Commit ist enthalten in:
Faizaan Gagan 2021-03-25 11:33:12 +05:30
Ursprung ee613d74c8
Commit 873b30ac65

Datei anzeigen

@ -21,9 +21,6 @@ export default WizardFieldValidator.extend({
showDefault: computed('hasNotSearched', 'hasInput', 'typing', function() {
return this.hasInput && (this.hasNotSearched || this.typing);
}),
insufficientCharacters: computed('typing', 'field.value', function() {
return this.hasInput && this.field.value.length < 5 && !this.typing;
}),
showSimilarTopics: computed('typing', 'hasSimilarTopics', function() {
return this.hasSimilarTopics && !this.typing;
}),
@ -31,6 +28,9 @@ export default WizardFieldValidator.extend({
return this.noSimilarTopics && !this.typing;
}),
hasValidationCategories: notEmpty('validationCategories'),
insufficientCharacters: computed('typing', 'field.value', function() {
return this.hasInput && this.field.value.length < 5 && !this.typing;
}),
insufficientCharactersCategories: and('insufficientCharacters', 'hasValidationCategories'),
@discourseComputed('validation.categories')