1
0
Fork 0
discourse-custom-wizard-unl.../assets/javascripts/wizard/components/validator.js.es6
2021-01-26 13:35:10 +05:30

16 Zeilen
Kein EOL
525 B
JavaScript

import Component from "@ember/component";
import { not } from "@ember/object/computed";
import { observes } from "discourse-common/utils/decorators";
export default Component.extend({
classNameBindings: ['isValid', 'isInvalid'],
validMessageKey: null,
invalidMessageKey: null,
isValid: null,
isInvalid: not('isValid'),
layoutName: 'components/validator', // useful for sharing the template with extending components
@observes('perform')
performValidation() {
this.validate();
},
});