Verify if given input is matching with other field.
This method mostly used for password and password_confirm
field to validate both value are same.

@param $key
@param $field
@return bool
966311
protected function isConfirmed(string $key, string $field) : bool
    {
        return $this->isSame($key, $field.'_confirm');
    }
646246
public function hasParam($field) {
        foreach ($this->getParams() as $param) {
            if ($param instanceof Expr && $param->getField() === $field) {
                return true;
            }
        }

        return false;
    }
2556
public function matches($key, $regex, &$matches = [])
    {
        if (!$this->has($key, self::HAS_ISSET)) {
            return false;
        }

        return (bool) preg_match($regex, $this->get($key), $matches);
    }
261562
private function validateKey($key) : bool {
        if (!hash_equals($this->appKey, $key)) {
            throw new \Nuki\Exceptions\Base('Used key does not equal the known application key');
        }
        
        return true;
    }
1310873
public function verifySign($data, $key)
    {
        $prestr = $data['prestr'];
        $sign = $data['sign'];
        $prestr = $prestr . $key;
        $mysgin = md5($prestr);

        if($mysgin == $sign) {
            return true;
        }

        return false;
    }
137905
public static function keyIsset($value, $key): bool
    {
        if (!static::isArrayAccessible($value)) {
            return false;
        }

        return isset($value[$key]);
    }
148697
public function hGet($key, $field) {
        return $this->getHandler($this->judge(__FUNCTION__))->hGet($key, $field);
    }
930626
public function validate($field, $input, array $params = array())
    {
        try {
            if ($input == '' || empty($params['0'])) {
                return false;
            }
            $params = $params['0'];
            if (empty($params['gcs_access_key']) || empty($params['gcs_secret_key'])) {
                return false;
            }
            
            $client = m62Gcs::getRemoteClient($params['gcs_access_key'], $params['gcs_secret_key']);
            $client->listBuckets();
            return true;
        } catch (\Exception $e) {
            return false;
        }
    }
1257464
public function hasVal($key) {
        return isset($this->field[$key]) || (is_array($this->field) && array_key_exists($key, $this->field));
    }
527138
public function validated($field = null, $default = false)
	{
		if ($field === null)
		{
			return $this->validated;
		}

		return array_key_exists($field, $this->validated) ? $this->validated[$field] : $default;
	}
165895
public function has($key)
    {
        $keys = is_array($key) ? $key : func_get_args();

        $input = $this->all();

        foreach ($keys as $value) {
            if (! Arr::has($input, $value)) {
                return false;
            }
        }

        return true;
    }
1015958
public function hexists($collection, $key, $field) {

        $set = $this->getKey($collection, $key, []);

        return isset($set[$field]);
    }
1224005
public static function verify($token, $key)
    {
        // Check values
        if (empty($token) || empty($key)) {
            return false;
        }

        // Split parts
        list($payloadJSON_encoded, $signature) = explode('.', $token);

        // Generate signature to verify
        $signatureGenerated = hash_hmac('SHA256', $payloadJSON_encoded, $key);

        return ($signature === $signatureGenerated);
    }
281701
function validateField (fields, key) {
  var value = fields[key] = castShorthand(fields[key])

  if (typeof value !== 'object')
    throw new TypeError('The definition of "' + key + '" must be an object.')

  if (key === primaryKey)
    throw new Error('Can not define primary key "' + primaryKey + '".')

  if (key in plainObject)
    throw new Error('Can not define field name "' + key +
      '" which is in Object.prototype.')

  if (!value[typeKey] && !value[linkKey])
    throw new Error('The definition of "' + key + '" must contain either ' +
      'the "' + typeKey + '" or "' + linkKey + '" property.')

  if (value[typeKey] && value[linkKey])
    throw new Error('Can not define both "' + typeKey + '" and "' + linkKey +
      '" on "' + key + '".')

  if (value[typeKey]) {
    if (typeof value[typeKey] === 'string')
      value[typeKey] = nativeTypes[
        stringifiedTypes.indexOf(value[typeKey].toLowerCase())]

    if (typeof value[typeKey] !== 'function')
      throw new Error('The "' + typeKey + '" on "' + key +
        '" must be a function.')

    if (!find(nativeTypes, function (type) {
      var hasMatch = type === value[typeKey] ||
        type.name === value[typeKey].name

      // In case this errors due to security sandboxing, just skip this check.
      if (!hasMatch)
        try {
          hasMatch = Object.create(value[typeKey]) instanceof type
        }
        catch (e) {
          hasMatch = true
        }

      return hasMatch
    }))
      throw new Error('The "' + typeKey + '" on "' + key + '" must be or ' +
        'inherit from a valid native type.')

    if (value[inverseKey])
      throw new Error('The field "' + inverseKey + '" may not be defined ' +
        'on "' + key + '".')
  }

  if (value[linkKey]) {
    if (typeof value[linkKey] !== 'string')
      throw new TypeError('The "' + linkKey + '" on "' + key +
        '" must be a string.')

    if (value[inverseKey] && typeof value[inverseKey] !== 'string')
      throw new TypeError('The "' + inverseKey + '" on "' + key + '" ' +
        'must be a string.')
  }

  if (value[isArrayKey] && typeof value[isArrayKey] !== 'boolean')
    throw new TypeError('The key "' + isArrayKey + '" on "' + key + '" ' +
        'must be a boolean.')
}
742081
protected function required(string $key) : bool
    {
        $val = $this->param[$key];

        if (is_string($val) && strlen(trim($val)) == 0) {
            $this->errors[$key.self::ERROR] =
                ucfirst($this->convertToFieldName($key)).' is required';

            return false;
        } elseif (is_array($val) && count($val) < 1) {
            $this->errors[$key.self::ERROR] =
                ucfirst($this->convertToFieldName($key)).' is required';

            return false;
        }

        return true;
    }
935936
public function matchesFieldKeys(array $keys): bool
    {
        if ( ! count($keys)) return false;

        return count(array_intersect($keys, $this->descendantFieldKeys())) > 0;
    }
371004
public function validateMatches(string $key, array $def, $value)
    {
        if (isset($def['matches'])) {
            if ($def['matches'][0] == '!') {
                $fieldName = substr($def['matches'], 1);
                if ($value == $this->getForm()->$fieldName) {
                    $this->addError($key, 'form.value_must_not_be_the_same', array('%other_field%' => $this->getFieldCaption($fieldName)));
                }
            } else {
                if ($value != $this->getForm()->{$def['matches']}) {
                    $this->addError($key, 'form.value_must_be_the_same', array('%other_field%' => $this->getFieldCaption($def['matches'])));
                }
            }
        }
    }