Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-13 05:32:53 +01:00
13 Zeilen
401 B
Text
13 Zeilen
401 B
Text
|
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);
|
||
|
}
|
||
|
}
|
||
|
});
|