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;
    }
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;
    }
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 ; }
Validates E-mails
@return boolean|null
Validates E - mails