mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-04 21:01:27 -05:00
17 lines
333 B
JavaScript
17 lines
333 B
JavaScript
import ValidState from 'wizard/mixins/valid-state';
|
|
|
|
export default Ember.Object.extend(ValidState, {
|
|
id: null,
|
|
type: null,
|
|
value: null,
|
|
required: null,
|
|
|
|
check() {
|
|
if (!this.get('required')) {
|
|
return this.setValid(true);
|
|
}
|
|
|
|
const val = this.get('value');
|
|
this.setValid(val && val.length > 0);
|
|
}
|
|
});
|