Skip to content

Instantly share code, notes, and snippets.

@chrisdel101
Last active June 5, 2019 19:40
Show Gist options
  • Select an option

  • Save chrisdel101/917f6d714d215e00594d4fdb1c8e5221 to your computer and use it in GitHub Desktop.

Select an option

Save chrisdel101/917f6d714d215e00594d4fdb1c8e5221 to your computer and use it in GitHub Desktop.
// inside computed
formErrors() {
return {
firstNameError: () => {
if(!this.editCustomer.firstName){
return this.errorMessages.blankError
}
},
lastNameError: () => {
if(!this.editCustomer.lastName){
return this.errorMessages.blankError
}
},
emailError:() => {
!this.editCustomer.email){
return this.errorMessages.blankError
}
}
},
<fg-input
v-model="editCustomer.firstName"
placeholder="First Name"
label="First Name"
name="firstName"
///called here
:error="formErrors.firstNameError()"
></fg-input>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment