Last active
June 5, 2019 19:40
-
-
Save chrisdel101/917f6d714d215e00594d4fdb1c8e5221 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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