original_string: protected function validateEmail()
      {
          $field = 'email';
  
          if ($this->isExcluded($field)) {
              return null;
          }
  
          $value = $this->getSubmitted($field);
  
          if ($this->isUpdating() && !isset($value)) {
              $this->unsetSubmitted($field);
              return null;
          }
  
          $label = $this->translation->text('E-mail');
  
          if (empty($value)) {
              $this->setErrorRequired($field, $label);
              return false;
          }
  
          if (!filter_var($value, FILTER_VALIDATE_EMAIL)) {
              $this->setErrorInvalid($field, $label);
              return false;
          }
  
          return true;
      }
code: protected function validateEmail()
      {
          $field = 'email';
  
          if ($this->isExcluded($field)) {
              return null;
          }
  
          $value = $this->getSubmitted($field);
  
          if ($this->isUpdating() && !isset($value)) {
              $this->unsetSubmitted($field);
              return null;
          }
  
          $label = $this->translation->text('E-mail');
  
          if (empty($value)) {
              $this->setErrorRequired($field, $label);
              return false;
          }
  
          if (!filter_var($value, FILTER_VALIDATE_EMAIL)) {
              $this->setErrorInvalid($field, $label);
              return false;
          }
  
          return true;
      }
code_tokens: protected function validateEmail ( ) { $ field = 'email' ; if ( $ this -> isExcluded ( $ field ) ) { return null ; } $ value = $ this -> getSubmitted ( $ field ) ; if ( $ this -> isUpdating ( ) && ! isset ( $ value ) ) { $ this -> unsetSubmitted ( $ field ) ; return null ; } $ label = $ this -> translation -> text ( 'E-mail' ) ; if ( empty ( $ value ) ) { $ this -> setErrorRequired ( $ field , $ label ) ; return false ; } if ( ! filter_var ( $ value , FILTER_VALIDATE_EMAIL ) ) { $ this -> setErrorInvalid ( $ field , $ label ) ; return false ; } return true ; }
docstring: Validates an E-mail
  @return boolean
docstring_tokens: Validates an E - mail