0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-10 12:22:54 +01:00
discourse-custom-wizard/assets/javascripts/wizard/components/alpha-validator.js.es6
2021-01-27 10:38:26 +05:30

13 Zeilen
Kein EOL
401 B
JavaScript

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);
}
}
});