Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- async addNewItem() {
- this.errors = [];
- if (this.newItem === "") {
- return;
- } else if (this.altEmail.length > 3) { //Uses n-1 size for some reason??
- this.errors.push("Too many emails, max 5");
- } else if (await this.api.validateEmail(this.newItem)) {
- this.errors.push("Email is not valid");
- } else {
- this.altEmail.push(this.newItem);
- this.newItem = "";
- }
- },
- async addNewItem() {
- this.errors = [];
- if (this.newItem === "") {
- return;
- } else if (this.altEmail.length > 3) { //Uses n-1 size for some reason??
- this.errors.push("Too many emails, max 5");
- } else if (await this.api.validateEmail(this.newItem)) {
- this.errors.push("Email is not valid");
- } else {
- this.altEmail.push(this.newItem);
- this.newItem = "";
- }
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement