0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-09-20 07:41:11 +02:00
discourse-custom-wizard/assets/javascripts/wizard/components/suggested-validator.js.es6

20 Zeilen
608 B
Text

import WizardFieldValidator from "../../wizard/components/validator";
import { ajax } from "discourse/lib/ajax";
import { getToken } from "wizard/lib/ajax";
import { getOwner } from "discourse-common/lib/get-owner";
import discourseComputed from "discourse-common/utils/decorators";
export default WizardFieldValidator.extend({
validMessageKey: 'hello',
invalidMessageKey: 'world',
validate() {
this.backendValidate({title: this.get("field.value")}).then(response => {
console.log(response)
})
},
init() {
this._super(...arguments);
}
});