0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-13 05:32:53 +01:00
discourse-custom-wizard/assets/javascripts/wizard/components/alpha-validator.js.es6

13 Zeilen
401 B
Text

2021-01-27 06:08:26 +01:00
import WizardFieldValidator from "../../wizard/components/validator";
export default WizardFieldValidator.extend({
validMessageKey: 'hello',
invalidMessageKey: 'world',
validate() {
if(this.field.value) {
this.field.value.length > 0 ? this.set('isValid', true) : this.set('isValid', false);
} else {
this.set('isValid', false);
}
}
});