diff --git a/src/app/pages/community/community-edit-form/community-edit-form.component.ts b/src/app/pages/community/community-edit-form/community-edit-form.component.ts index 61482e5..2314f74 100644 --- a/src/app/pages/community/community-edit-form/community-edit-form.component.ts +++ b/src/app/pages/community/community-edit-form/community-edit-form.component.ts @@ -162,7 +162,6 @@ export class CommunityEditFormComponent implements OnInit{ console.log(community); if (!Validator.hasValidEmails(community['managers']) || !this.hasFilled(community["name"])) { - // if (!this.hasValidEmail(community) || !this.hasFilled(community["name"])) { this._router.navigate(['/community-edit-form'], {queryParams: { "communityId": this.communityId}}); } else { var newManagers = this.getNewManagers(); @@ -303,28 +302,6 @@ export class CommunityEditFormComponent implements OnInit{ return false; } - // private hasValidEmail(data: any): boolean { - // let length = data['managers'].length; - // - // for(let i = 0; i < length; i++) { - // if (!this.emailValidator(data['managers'][i])){ - // // TODO remove console message after final testing - // console.log("INVALID EMAIL"); - // return false; - // } - // } - // // TODO remove console message after final testing - // console.log("ALL EMAILS ARE VALID"); - // return true; - // } - // - // private emailValidator(email : any): boolean { - // if (email.match("^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$")) - // return true; - // else - // return false; - // } - private change() { this.hasChanged = true; this.successfulSaveMessage = '';