Formatting

This commit is contained in:
richard-dds 2019-06-13 13:33:15 -04:00
parent eb4172517b
commit 06ea746f38
2 changed files with 7 additions and 7 deletions

View File

@ -20,15 +20,15 @@ export default {
optional: Boolean, optional: Boolean,
nullOption: { nullOption: {
type: String, type: String,
default: '' default: '',
} },
}, },
created: function() { created: function() {
emitEvent('field-mount', this, { emitEvent('field-mount', this, {
optional: this.optional, optional: this.optional,
name: this.name, name: this.name,
valid: this._isValid(this.value) valid: this._isValid(this.value),
}) })
}, },
@ -52,12 +52,12 @@ export default {
value: e.target.value, value: e.target.value,
name: this.name, name: this.name,
watch: this.watch, watch: this.watch,
valid: this._isValid(e.target.value) valid: this._isValid(e.target.value),
}) })
}, },
_isValid: function(value) { _isValid: function(value) {
return this.optional || value !== this.nullOption return this.optional || value !== this.nullOption
} },
}, },
} }

View File

@ -70,7 +70,7 @@ export default {
emitEvent('field-mount', this, { emitEvent('field-mount', this, {
optional: this.optional, optional: this.optional,
name: this.name, name: this.name,
valid: this._isValid(this.value) valid: this._isValid(this.value),
}) })
}, },
@ -150,6 +150,6 @@ export default {
} }
return valid return valid
} },
}, },
} }