'Is' validation rule. Custom rule specified by $checkFunc(). Checks that data NOT satisfies to rule.

@param callable     $checkFunc
@param string|array $key
@param string       $message

@return $this
771451
public function isNot($checkFunc, $key, $message)
    {
        if (is_array($key)) {
            foreach ($key as $name) {
                $this->isNot($checkFunc, $name, $message);
            }
        } else {
            if (isset($this->scope[$key]) && call_user_func($checkFunc, $this->scope[$key])) {
                $this->errors[$key] = sprintf($message, $key);
            }
        }

        return $this;
    }
814350
public function setRule($rule, $function, $message = '', $args = array())
    {
        if (!array_key_exists($rule, $this->rules)) {
            $this->rules[$rule] = TRUE;
            if (!array_key_exists($rule, $this->functions)) {
                if (!is_callable($function)) {
                    die('Invalid function for rule: ' . $rule);
                }
                $this->functions[$rule] = $function;
            }
            $this->arguments[$rule] = $args; // Specific arguments for rule

            $this->messages[$rule] = (empty($message)) ? $this->_getDefaultMessage($rule, $args) : $message;
        }
    }
149336
protected function maybeRunValidationKeyRules($key)
    {
        if (($key & $this->transactionType) !== $this->transactionType) {
            return;
        }

        foreach ($this->validations->rules[$key] as $validation) {
            if (null === $validation->clause) {
                continue;
            }

            if ($this->transactionModifier === $validation->modifier
                && !call_user_func($validation->clause->callback, $this)
            ) {
                throw new BuilderException($validation->clause->message);
            }
        }
    }
1238195
private function validate($key, $value) {
    if ($this->keyValidation) {
      $cb = $this->keyValidation;
      $cb($key);
    }
    if ($this->valueValidation) {
      $cb = $this->valueValidation;
      $cb($value);
    }
  }
1361674
public function unique($message = null)
    {
        $this->addValidationRule('_unique');

        if (! is_null($message)) {
            $this->addValidationMessage('unique', $message);
        }

        return $this;
    }
255948
protected function unique($key, $message)
        {
            return !isset($this->messages[$key]) || !Arrays::in($message, $this->messages[$key]);
        }
334273
public function addValidationMessage($rule, $message)
    {
        if (($pos = strpos($rule, ':')) !== false) {
            $rule = substr($rule, 0, $pos);
        }

        $this->validationMessages[$rule] = $message;

        return $this;
    }
1230781
protected function onInvalidEventPatternWithoutValidate($pattern, $key, $check = [])
    {
        return $this->required()->pattern($pattern)->onInvalidEventCustomValidity($key, $check);
    }
298673
public function isValid(Message $message)
    {
        try {
            $this->validate($message);
            return true;
        } catch (InvalidSnsMessageException $e) {
            return false;
        }
    }
978163
public function add($key, $message)
    {
        if (empty($this->violations[$key])) {
            $this->violations[$key] = [];
        }

        $this->violations[$key] = array_merge(
            $this->violations[$key],
            (array) $message
        );

        return $this;
    }
1251541
public function push(string $errorMessage, ?string $key = null): self
    {
        if ($key === null) {
            $this->errors[] = $errorMessage;
        } else {
            $this->errors[$key][] = $errorMessage;
        }

        return $this;
    }
14227
public function exists( $message = null)
    {
        $this->setRule(__FUNCTION__, function ($val) {
            return null !== $val;
        }, $message);
        return $this;
    }
834945
protected function performValidate($key, &$value)
    {
        if (!$filter = $this->_schema['filter'][$key])
            return true;

        $validation = Validation::instance();
        $moe = Base::instance();
        $field = $this->_properties['fields'][$key];
        foreach ($filter as $func => $param) {
            if (is_numeric($func)) {
                $func = $param;
                $args = array();
            } else
                $args = [$param];

            $function = $func;
            if (method_exists($validation, $func))
                $func = array($validation, $func);
            elseif (method_exists($this, $func) ||
                preg_match('/^('.self::Magic.')/', $func))
                $func = array($this, $func);
            elseif (method_exists($moe, $func))
                $func = array($moe, $func);

            array_unshift($args, $value);
            if (false === $result = $moe->call($func, $args)) {
                $this->_messages[] = $validation->message($function, $field, $value, $param);
                return false;
            } else
                is_bool($result) || $value = $result;
        }

        return true;
    }
767641
public function validate0101(MessageInterface $message, &$reason = "")
    {
        // 1.1 incorporates 1.0 validation standar
        if (!$this->validate0100($message, $reason)) {
            return false;
        }

        foreach ($message->getAllAdditionals() as $key => $value) {
            if (!preg_match('#^[\w\.\-]*$#', $key)) {
                $reason = sprintf(
                    "additional key '%s' contains invalid characters",
                    $key
                );

                return false;
            }
        }

        return true;
    }
1107186
protected function onInvalidEventPattern($pattern, $key, $check = [], $type = NULL)
    {
        $this->validate[] = $type ?: $key;

        return $this->onInvalidEventPatternWithoutValidate($pattern, $key, $check);
    }
461172
public function required($key, $message = null)
    {
        if (is_array($key)) {
            foreach ($key as $name) {
                $this->required($name, $message);
            }
        } else {
            if ( ! (isset($this->scope[$key]) && ! empty($this->scope[$key]))) {
                $this->errors[$key] = sprintf($message !== null ? $message : self::$requiredMessage, $key);
            }
        }

        return $this;
    }
19556
public static function isValid($sign, $messageBody, $token)
    {
        return hash_equals($sign, self::make($messageBody, $token));
    }