Project

General

Profile

« Previous | Next » 

Revision 54469

Added by Sofia Baltzi over 5 years ago

Check for gaps in email's field form

View differences:

invite.component.ts
114 114
      this.successfulSentMessage = "";
115 115
      this.inviteErrorMessage = "";
116 116
      this.status = this.errorCodes.LOADING;
117
      if (this.recipients != "" && this.body.fromName != "") {
117
      if (!this.isEmpty(this.recipients) && this.body.fromName != "") {
118 118
        if (this.validateEmails()) {
119 119
          this.composeEmail();
120 120
          console.log(this.email.body);
......
151 151
      }
152 152
  }
153 153

  
154
  private isEmpty(data: string): boolean {
155
      if (data != undefined && !data.replace(/\s/g, '').length)
156
          return true;
157
        else
158
          return false;
159
  }
160

  
154 161
  public resetMessages() {
155 162
      this.errorMessage = "";
156 163
      this.successfulSentMessage = "";

Also available in: Unified diff