original_string: protected function validateDataEmailStore()
      {
          $field = 'data.email';
          $value = $this->getSubmitted($field);
          $label = $this->translation->text('E-mail');
  
          if (empty($value)) {
              $this->setErrorRequired($field, $label);
              return false;
          }
  
          if (!is_array($value)) {
              $this->setErrorInvalid($field, $label);
              return false;
          }
  
          $filtered = array_filter($value, function ($email) {
              return filter_var($email, FILTER_VALIDATE_EMAIL);
          });
  
          if (count($value) != count($filtered)) {
              $this->setErrorInvalid($field, $label);
              return false;
          }
  
          return true;
      }
code: protected function validateDataEmailStore()
      {
          $field = 'data.email';
          $value = $this->getSubmitted($field);
          $label = $this->translation->text('E-mail');
  
          if (empty($value)) {
              $this->setErrorRequired($field, $label);
              return false;
          }
  
          if (!is_array($value)) {
              $this->setErrorInvalid($field, $label);
              return false;
          }
  
          $filtered = array_filter($value, function ($email) {
              return filter_var($email, FILTER_VALIDATE_EMAIL);
          });
  
          if (count($value) != count($filtered)) {
              $this->setErrorInvalid($field, $label);
              return false;
          }
  
          return true;
      }
code_tokens: protected function validateDataEmailStore ( ) { $ field = 'data.email' ; $ value = $ this -> getSubmitted ( $ field ) ; $ label = $ this -> translation -> text ( 'E-mail' ) ; if ( empty ( $ value ) ) { $ this -> setErrorRequired ( $ field , $ label ) ; return false ; } if ( ! is_array ( $ value ) ) { $ this -> setErrorInvalid ( $ field , $ label ) ; return false ; } $ filtered = array_filter ( $ value , function ( $ email ) { return filter_var ( $ email , FILTER_VALIDATE_EMAIL ) ; } ) ; if ( count ( $ value ) != count ( $ filtered ) ) { $ this -> setErrorInvalid ( $ field , $ label ) ; return false ; } return true ; }
docstring: Validates E-mails
  @return boolean|null
docstring_tokens: Validates E - mails