export default { computed: { formValid () { // loop over all contents of the fields object and check if they exist and valid. return Object.keys(this.fields).every(field => { return this.fields[field] && this.fields[field].valid; }); } } }