Evaulate email.

@param $value Value to be checked

@return bool
543710
public function email($value)
    {
        if ($this->notBeEmpty($value)) {
            if (filter_var($value, FILTER_VALIDATE_EMAIL) !== false) {
                return true;
            } else {
                return false;
            }
        } else {
            return false;
        }
    }
110551
protected function validate($value)
    {
        return Match::on(Option::create($this->validator->isValid($value), false))
            ->Monad_Option_Some(true)
            ->Monad_Option_None(
                function () {
                    $msgs = $this->validator->getMessages();
                    array_walk(
                        $msgs, 
                        function ($msg) {
                            $this->messenger->add(new StringType($msg));
                        }
                    );
                    return false;
                }
            )
            ->value();
    }
346728
public function check($value, IValidationData $data = null) {
        if (is_string($value)) {
            return filter_var($value, FILTER_VALIDATE_EMAIL) !== false;
        }
        return false;
    }
949053
public static function checkEmailAddress($value) {
        $value = filter_var(trim($value),FILTER_SANITIZE_EMAIL);
        
        //validate the email address format
        if(!empty($value) && filter_var($value, FILTER_VALIDATE_EMAIL) === false){            
            throw new HpsInvalidRequestException(
                HpsExceptionCodes::INVALID_EMAIL_ADDRESS, 'Invalid email address'
            );
        }

        //validate length of input data and throw exception
        if (!empty(self::$_inputFldMaxLength['Email']) && strlen($value) > self::$_inputFldMaxLength['Email']) {            
            $errorMessage = "The value for Email can be no more than " . self::$_inputFldMaxLength['Email'] . ' characters, Please try again after making corrections';
            throw new HpsInvalidRequestException(
                HpsExceptionCodes::INVALID_INPUT_LENGTH, $errorMessage
            );
        }
        return $value;
    }
264555
public function isTemporary(string $value): bool
    {
        try {
            $response = $this->client->request('GET', sprintf('%s/detect/%s', self::API_URL, $value));
        } catch (GuzzleException $exception) {
            throw Exception::fromMessage($exception->getMessage());
        }

        $decoded = json_decode($response->getBody()->getContents(), true);

        return (bool)($decoded['temporary'] ?? false);
    }
849695
public static function isValid($value): bool
    {
        try {
            self::decode($value);

            return true;
        } catch (\Throwable $e) {
            return false;
        }
    }
522783
public function isValid($value)
    {
        $valueString = (string) $value;

        $this->_setValue($valueString);

        if (($this->_format !== null) or ($this->_locale !== null)) {
            include_once 'Zend/Date.php';
            if (!Zend_Date::isDate($value, $this->_format, $this->_locale)) {
                if ($this->_checkFormat($value) === false) {
                    $this->_error(self::FALSEFORMAT);
                } else {
                    $this->_error(self::INVALID);
                }
                return false;
            }
        } else {
            if (!preg_match('/^\d{4}-\d{2}-\d{2}$/', $valueString)) {
                $this->_error(self::NOT_YYYY_MM_DD);
                return false;
            }

            list($year, $month, $day) = sscanf($valueString, '%d-%d-%d');

            if (!checkdate($month, $day, $year)) {
                $this->_error(self::INVALID);
                return false;
            }
        }

        return true;
    }
641465
static public function verify_username($value)
    {
        if (is_numeric($value)) {
            return true;
        } elseif (static::verify_email($value) ) {
            return true;
        } else {
            $regex = "^[a-z0-9\!\@\#\$\%\&\*\_\-\=]+$";
            return static::verify_regex($regex, $value, 'i');
        }
    }
1074320
public function check($value)
    {
        $this->validateStructure($value);

        return $this->refreshFlow ? $this->validateRefresh($value) : $this->validatePayload($value);
    }
449557
public static function validateDate($value)
    {
        if (\is_string($value) && \strlen($value) > 0 && (
                false !== ($date1 = \DateTime::createFromFormat('Y-m-d\TH:i:sP', $value))
                || false !== \DateTime::createFromFormat('Y-m-d', $value)
            )
        ) {
            $format = 'Y-m-d';

            if (false !== $date1) {
                $format = 'c';
            }

            return \htmlentities((new \DateTime($value))->format($format));
        }

        return false;
    }
768044
public static function email($value, $domains = null): bool
    {
        $isEmail = (bool) filter_var($value, FILTER_VALIDATE_EMAIL);

        if ($isEmail && $domains !== null) {
            list(, $host) = explode('@', $value);
            $domains = (array) $domains;

            if (in_array($host, $domains)) {
                return true;
            }

            return false;
        }

        return $isEmail;
    }
227744
protected function validate($value)
    {
        $ret = ($value instanceof \Traversable ||
            $value instanceof \stdClass ||
            is_array($value));
        if (!$ret) {
            $this->messenger->add(new StringType('value is not traversable'));
        }

        return $ret;
    }
111836
public function isValueValid($value) {
		return $value instanceof Type\Place || $value instanceof Type\PostalAddress || $value instanceof DataType\TextType;
	}
379250
public function isValueValid($value) {
		return $value instanceof Type\PropertyValue || $value instanceof DataType\TextType || $value instanceof DataType\URLType;
	}
1238738
public function parse($value)
    {
        if (!strlen($value)) {
            return;
        }

        $this->_data = $value;
        $this->_datalen = strlen($value);
        $this->_params['validate'] = true;
        $this->_ptr = 0;

        $this->_rfc822SkipLwsp();

        while ($this->_curr() !== false) {
            try {
                $this->ids[] = $this->_parseMessageId();
            } catch (Horde_Mail_Exception $e) {
                break;
            }

            // Some mailers incorrectly insert commas between reference items
            if ($this->_curr() == ',') {
                $this->_rfc822SkipLwsp(true);
            }
        }
    }
587879
protected function validatorValue($value)
    {
        if (!$value) {
            return $this->allowEmpty;
        }

        $pattern = str_replace('{schemes}', '(' . implode('|', $this->validSchemes) . ')', $this->pattern);
        if (preg_match($pattern, $value)) {
            return true;
        }

        return false;
    }
63333
public function isValueValid($value) {
		return $value instanceof Type\DataFeedItem || $value instanceof DataType\TextType || $value instanceof Type\Thing;
	}