Validates all values by array-key.

TODO: Add option to validate recursive through an array with RecursiveArrayIterator.

@param   mixed $values

@return  bool TRUE|FALSE

@deprecated
330576
protected function validate_by_key( $values ) {

		$is_valid = TRUE;

		if ( count( $this->validators_by_key ) < 1 ) {

			return $is_valid;
		}

		foreach ( $values as $key => $value ) {
			if ( ! is_scalar( $value ) || ! isset( $this->validators_by_key[ $key ] ) ) {
				continue;
			}

			/** @var $validators ValidatorInterface[] */
			$validators = $this->validators_by_key[ $key ];
			foreach ( $validators as $validator ) {
				$is_valid = $validator->is_valid( $value );

				if ( ! $is_valid ) {
					$this->error_messages[ $key ] = $validator->get_error_messages();
					break;
				}
			}

			if ( ! $is_valid ) {
				break;
			}
		}

		return $is_valid;
	}
1332599
public function evaluate($values)
    {
        $returnValue = PasswordConstraintsService::singleton()->validate($values);

        if( !$returnValue && !$this->hasOption('message') ){
            $this->setMessage(implode( ', ', PasswordConstraintsService::singleton()->getErrors()));
        }

        return (bool) $returnValue;
    }
186213
public function toKeyValue(array $values)
    {
        $result = [];

        foreach ($values as $key => $value) {
            if (is_array($value)) {
                $result[$key] = $this->toKeyValue($value);
            } elseif (is_object($value)) {
                $result[$key] = $this->toKeyValue((array) $value);
            } else {
                $result[$key] = $value;
            }
        }

        return $result;
    }
613891
protected static function filterConstant(array $values)
    {
        if (isset($values[1]) && in_array($values[1], self::VALID_CONSTANTS)) {
            $values[1] = constant($values[1]);
        }
        return $values[1];
    }
422313
public function intoValues(array $values)
    {
        if (is_array($values[0])) {
            $this->intoValues = $values;
        } else {
            $this->intoValues[] = $values;
        }
        return $this;
    }
1202901
public function evaluate($values)
    {
        $domain = $this->getProperty()->getDomain();
        foreach ($domain as $class) {
            $resources = $class->searchInstances(array($this->getProperty()->getUri() => $values), array('recursive' => true, 'like' => false));
            if (count($resources) > 0) {
                return false;
            }
        }
        return true;
    }
1211280
public function setValues($values=array()) {
		return $this->_addOrSetValues($values, function(HtmlTR $row,$_values){$row->setValues($_values);});
	}
621544
public static function validate(array $entries)
    {
        if (!self::loaded()) return false;
        $base = self::$__configurator->getRequired();
        foreach ($entries as $var=>$val) {
            if (in_array($var, $base)) {
                unset($base[array_search($var, $base)]);
            }
        }
        return (count($base)===0);
    }
189370
public function validate($value)
    {
        if (!(is_array($value) || $value instanceof \stdClass)) {
            return false;
        }

        return $this->executePropertiesValidation($this->convertToArray($value));
    }
1374413
public function isValid($value)
    {
        if (!is_array($value)) {
            return false;
        }

        foreach ($value as $subValue) {
            if (!$this->valueTypeNode->isValid($subValue)) {
                return false;
            }
        }

        return true;
    }
1367827
public function isValid(array $values)
    {
        foreach ($values as $value) {
            if (!$this->checkType($value)) {
                return false;
            }
        }

        return true;
    }
298657
public function setValues(array $values)
    {
        $this->getValidator()->validateRequired($values, $this->required);
        $this->values = array_merge($this->values, $values);
        
        return $this;
    }
1097186
public function setValuesRaw($values = array())
    {
        foreach ($values as $key => $value) {
            $this->setRaw($key, $value);
        }

        return $this;
    }
866108
public function contains(...$values): bool
    {
        foreach ($values as $value) {
            if ( ! $this->table->hasKey($value)) {
                return false;
            }
        }

        return true;
    }
381291
public function valuesArray($values) {
		if ($values instanceof \ArrayObject)
			$this->value = $values->getArrayCopy();
		elseif (is_object($values))
			$this->value = get_object_vars($values);
		elseif (is_array($values))
			$this->value = $values;
		else
			throw new \InvalidArgumentException("Method 'valuesArray' expected an object or array value");
		
		if (is_numeric(key($this->value))) {
			$this->valueList = $this->value;
			$this->value = null;
		}
		
		return $this;
	}
1066951
public function isValid($value)
    {
        $this->_setValue($value);
        if ($this->getRecursive()) {
            $iterator = new RecursiveIteratorIterator(new RecursiveArrayIterator($this->_haystack));
            foreach($iterator as $element) {
                if ($this->_strict) {
                    if ($element === $value) {
                        return true;
                    }
                } else if ($element == $value) {
                    return true;
                }
            }
        } else {
            if (in_array($value, $this->_haystack, $this->_strict)) {
                return true;
            }
        }

        $this->_error(self::NOT_IN_ARRAY);
        return false;
    }
790900
public function valid($fields = array())
    {
        if (empty($fields)) {
            $fields = array_diff($this->getFields(), array($this->getIndex()));
        }
        foreach ($fields as $field) {
            $value = $this->getFieldValue($field);
            if (!empty($value)) {
                return true;
            }
        }
        return false;
    }