Checks the confirm parameters
@param array $value An array with keys 'changeRequest' and 'salt' containing the request id and the validation salt
968490
public function Check($value)
    {
        if (!is_array($value) || !isset($value['changeRequest']) || !isset($value['salt'])) {
            $this->error = self::Failed;
        }
        $id = $value['changeRequest'];

        $request = MemberChangeRequest::Schema()->ById($id);
        if (!$request || $value['salt'] !== $request->GetMailSalt() || $request->GetPurpose() !== (string) $this->purpose) {
            $this->error = self::Failed;
        }
        else if ($this->IsOutdated($request)) {
            $request->Delete();
            $this->error = self::Failed;
        }
        else {
            $validator = DatabaseCount::NoneInTableField(Member::Schema(), 'EMail');
            if ($validator->Check($request->GetNewValue())) {
                $this->request = $request;
            }
            else {
                $this->error = self::Failed;
            }
        }
        return $this->error == '';
    }
189678
public function setIsApproved($value)
    {
        if ($value === null || $value === '') {
            $this->approved = null;
        } else {
            $this->approved = (bool) $value;
        }

        return $this;
    }
360606
protected function isValidValue($value)
    {
        $valid = true;
        if (is_array($value)) {
            $numericKeys = 0;
            foreach ($value as $k => $v) {
                $numericKeys += is_integer($k);
                if (!$this->isValidValue($v)) {
                    $valid = false;
                    break;
                }
            }
            if (!($numericKeys == 0 || $numericKeys == count($value))) {
                $valid = false;
            }
        } else {
            if (null !== $value && !is_scalar($value)) {
                $valid = false;
            }
        }
        return $valid;
    }
281528
private function check($value, $params) {

		if(true === is_string($value) || is_numeric($value)) {
			return false === in_array(preg_match($params[0], $value), [false, 0]);
		}

		return false;
	}
792969
protected function _validate($value)
    {
        if (!is_string($value)) {
            return false;
        }

        if (stripos($value, (string)  dirname(AnRequest::url()->getUrl(AnHttpUrl::SCHEME | AnHttpUrl::HOST))) !== 0) {
            return false;
        }

        return true;
    }
1085679
private function stringValueChecker($paramName, $value)
        {
            if (isset($this->httpConfigs[$paramName])) {
                $param = $this->httpConfigs[$paramName];
                if (strstr($param, $value) && false !== strpos($param, $value)) {
                    return true;
                } else {
                    return false;
                }
            }
            return false;
        }
486958
protected function _validate_bool($value)
    {
        $trueValues = ['1', 'true'];
        $falseValues = ['0', 'false'];

        if (in_array($value, $trueValues, true)) {
            return true;
        } elseif (in_array($value, $falseValues, true)) {
            return false;
        } else {
            return null;
        }
    }
822230
public static function validValue($value): bool
    {
        $enumerables = self::getCache();
        $values = array_values($enumerables);

        return \in_array($value, $values, true);
    }
558123
public function checkValue(&$value)
    {
        if (parent::checkValue($value) === true) {
            if (!preg_match('/^(?:from|to|(?:\d{1,2}|100)%)$/D', $value)) {
                $this->setIsValid(false);
                $this->addValidationError("Invalid value '$value' for the keyframe selector.");

                return false;
            }
            return true;
        }

        return false;
    }
247712
private function check($value, $params) {

		if(true === is_string($value) || true === is_numeric($value)) {
			return floatval($value) >= floatval($params[0]) && floatval($value) <= floatval($params[1]);
		}

		return false;
	}
182996
private function check($value) {

		$ipv4 = new Ipv4();
		$ipv4 -> setValue($value);

		$ipv6 = new Ipv6();
		$ipv6 -> setValue($value);

		return true === $ipv4 -> isValid() || $ipv6 -> isValid();
	}
1143775
private function mxCheck(string $value = ''): bool
    {
        $mxHosts = [];
        $weight = [];

        if (@\getmxrr($value, $mxHosts, $weight) !== false) {
            if (!empty($mxHosts) && !empty($weight)) {
                $mxHosts = \array_combine($mxHosts, $weight);
            }
            \arsort($mxHosts);
        } elseif (($result = @\gethostbynamel($value)) !== false) {
            $mxHosts = \array_flip($result);
        }

        $isValid = true;
        if (empty($mxHosts)) {
            $isValid = false;
        } elseif ($this->options['deep-mx-check'] === true) {
            $isValid = $this->deepMxCheck($mxHosts);
        }
        if (!$isValid) {
            $this->setError(self::VALIDATOR_ERROR_EMAIL_INVALID_MX);
        }

        return $isValid;
    }
7394
protected function isValueSelected($value)
	{
		$val = $this->getValue();
		if (is_null($value)) {
			return FALSE;
		}
		elseif (is_array($val)) {
			return in_array($value, $val);
		}

		return $value == $val;
	}
847495
private function executePropertiesValidation(array $value)
    {
        $rest = $value;
        return $this->validateByProperty($value, $rest)
            && $this->validateByPattern($value, $rest)
            && $this->validateAdditionalProperties($rest);
    }
921302
public function isValid($value)
    {
        $this->_setValue($value);

        if (!is_string($value)) {
            $this->_error(self::INVALID, $value);
            return false;
        }

        if (!ctype_digit($value)) {
            $this->_error(self::CONTENT, $value);
            return false;
        }

        $length = strlen($value);
        $types  = $this->getType();
        $foundp = false;
        $foundl = false;
        foreach ($types as $type) {
            foreach ($this->_cardType[$type] as $prefix) {
                if (substr($value, 0, strlen($prefix)) == $prefix) {
                    $foundp = true;
                    if (in_array($length, $this->_cardLength[$type])) {
                        $foundl = true;
                        break 2;
                    }
                }
            }
        }

        if ($foundp == false){
            $this->_error(self::PREFIX, $value);
            return false;
        }

        if ($foundl == false) {
            $this->_error(self::LENGTH, $value);
            return false;
        }

        $sum    = 0;
        $weight = 2;

        for ($i = $length - 2; $i >= 0; $i--) {
            $digit = $weight * $value[$i];
            $sum += floor($digit / 10) + $digit % 10;
            $weight = $weight % 2 + 1;
        }

        if ((10 - $sum % 10) % 10 != $value[$length - 1]) {
            $this->_error(self::CHECKSUM, $value);
            return false;
        }

        if (!empty($this->_service)) {
            try {
                // require_once 'Zend/Validate/Callback.php';
                $callback = new Zend_Validate_Callback($this->_service);
                $callback->setOptions($this->_type);
                if (!$callback->isValid($value)) {
                    $this->_error(self::SERVICE, $value);
                    return false;
                }
            } catch (Zend_Exception $e) {
                $this->_error(self::SERVICEFAILURE, $value);
                return false;
            }
        }

        return true;
    }
864250
protected function isValid($value)
    {
        if (is_null($value)) {
            return;
        }

        if (in_array($value, $this->options['values'], true)) {
            return;
        }

        $errorMessage = 'One of %s is expected.';

        if (is_string($value)) {
            $errorMessage .= sprintf(' Got "%s" instead.', $value);
        }

        $this->addError($errorMessage, 1514999090, [json_encode($this->options['values'])]);
    }
407938
public function checkRequired($value)
    {
        if (is_null($value)) {
            return false;
        }

        if (is_string($value) && trim($value) === '') {
            return false;
        }

        if ((is_array($value) || $value instanceof Countable) && count($value) < 1) {
            return false;
        }

        return true;
    }