Validates that a set field / property is a valid upload array.

@deprecated Use \Cake\Utility\Validation::uploadedFile() instead.
@param mixed $value
@return bool
768680
public function isUploadArray($value) {
		if (!is_array($value)) {
			return false;
		}
		$requiredKeys = ['name', 'type', 'tmp_name', 'error', 'size'];
		$keys = array_keys($value);
		foreach ($requiredKeys as $key) {
			if (!in_array($key, $keys)) {
				return false;
			}
		}

		return true;
	}
841241
public function isValueValid($value) {
		return $value instanceof Type\PlaceType || $value instanceof Type\PostalAddressType || $value instanceof DataType\URLType;
	}
939348
protected function isValid($value)
    {
        if ($value === null) {
            $this->addError('This property is required.', 1221560910);
        }
        if ($value === '') {
            $this->addError('This property is required.', 1221560718);
        }
        if (is_array($value) && empty($value)) {
            $this->addError('This property is required', 1354192543);
        }
        if (is_object($value) && $value instanceof \Countable && $value->count() === 0) {
            $this->addError('This property is required.', 1354192552);
        }
    }
482889
public function validate($value)
    {
        if ($this->notBeEmpty($value)) {
            $value = json_decode($value);
            if ($value !== null) {
                return true;
            } else {
                return false;
            }
        } else {
            return false;
        }
    }
639751
public function isValid($value)
    {
        if (array_key_exists($value, $this->_files)) {
            $files[$value] = $this->_files[$value];
        } else {
            foreach ($this->_files as $file => $content) {
                if ($content['name'] === $value) {
                    $files[$file] = $this->_files[$file];
                }

                if ($content['tmp_name'] === $value) {
                    $files[$file] = $this->_files[$file];
                }
            }
        }

        if (empty($files)) {
            $this->_error(self::FILE_NOT_FOUND);
            return false;
        }

        foreach ($files as $file => $content) {
            $this->_value = $file;
            switch($content['error']) {
            case 0:
                if (!is_uploaded_file($content['tmp_name'])) {
                    $this->_error(self::ATTACK);
                }
                break;

            case 1:
                $this->_error(self::INI_SIZE);
                break;

            case 2:
                $this->_error(self::FORM_SIZE);
                break;

            case 3:
                $this->_error(self::PARTIAL);
                break;

            case 4:
                $this->_error(self::NO_FILE);
                break;

            case 6:
                $this->_error(self::NO_TMP_DIR);
                break;

            case 7:
                $this->_error(self::CANT_WRITE);
                break;

            case 8:
                $this->_error(self::EXTENSION);
                break;

            default:
                $this->_error(self::UNKNOWN);
                break;
            }
        }

        if (count($this->_messages) > 0) {
            return false;
        } else {
            return true;
        }
    }
822230
public static function validValue($value): bool
    {
        $enumerables = self::getCache();
        $values = array_values($enumerables);

        return \in_array($value, $values, true);
    }
855694
public function isValid($value)
    {
        foreach ($this as $type) {
            if ($type->isValid($value)) {
                return true;
            }
        }

        return false;
    }
1126306
public function validateRequired($value)
    {
        // Check for file!
        if (true === is_array($value) && true === array_key_exists('tmp_name', $value)) {
            // At least it was uploaded its valid in meaning of "required" <= NOT EMPTY
            $valid = ($value['error'] < UPLOAD_ERR_PARTIAL);
        } else {
            // Plain value ...
            $valid = (!is_null($value) && (is_array($value) || is_object($value) || (strlen($value) > 0)));
        }

        return $valid;
    }
1109236
protected function isValid($value) {
		if(!($value instanceof PersistentResource)) {
			$this->addError('Given value is no Flow Resource', 1433344498);
		}

		$size = $value->getFileSize();

		$minimum = $this->options['minimum'];
		$maximum = $this->options['maximum'];
		if ($minimum > $maximum) {
			$x = $minimum;
			$minimum = $maximum;
			$maximum = $x;
		}

		if ($size < $minimum || $size > $maximum) {
			$this->addError('Filesize has to be between %1$d and %2$d.', 1221561046, array($minimum, $maximum));
		}
	}
401514
protected function isPhpFileUpload($value)
    {
        if (is_array($value) 
            && isset($value['tmp_name']) 
            && isset($value['name'])) {
            
            return true;
        } else {
            return false;
        }
    }
189370
public function validate($value)
    {
        if (!(is_array($value) || $value instanceof \stdClass)) {
            return false;
        }

        return $this->executePropertiesValidation($this->convertToArray($value));
    }
1162151
protected function isValid($value) {

		if(!($value instanceof PersistentResource)) {
			$this->addError('Given value is no Flow Resource', 1433344498);
		}

		$fileMimeType = $value->getMediaType();

		if(!\in_array($fileMimeType, $this->options['allowedMimeTypes'], true)) {
			$this->addError(
				'The given asset was not of type %1$s but is of type %2$s',
				1433343575,
				array(
					implode(', ', $this->options['allowedMimeTypes']),
					$fileMimeType
				)
		);
		}

	}
931253
public function isValid($value)
    {
        if (!is_string($value) && !is_int($value)) {
            $this->_error(self::INVALID);
            return false;
        }

        $this->_setValue($value);
        if (!ctype_xdigit((string) $value)) {
            $this->_error(self::NOT_HEX);
            return false;
        }

        return true;
    }
20927
public function isValid($value) {
		if ($this->haystack === null) {
			throw new ValidationFailure('Reference array wasn\'t been suplied');
		}
		
		if (in_array($value, $this->haystack, $this->strict)) {
			return true;
		}
		
		$this->addMessage('Value does not exists in the list');
		
		return false;
	}
505458
public function isValid($value) : bool
    {
        if ($value === null && $this->nullable) {
            return true;
        }

        return $value instanceof Metadata;
    }
588690
public function validate($value)
    {
        $this->pushResult();
        if ($this->acceptsEmptyValues === false || $this->isEmpty($value) === false) {
            $this->isValid($value);
        }
        return $this->popResult();
    }
572258
public static function validate($value)
    {
        if (!is_array($value)) {
            return false;
        }
        if (!isset($value['from'])) {
            return false;
        }
        if (AddressValidator::validate($value['from']) === false) {
            return false;
        }
        if (isset($value['to']) && AddressValidator::validate($value['to']) === false && $value['to'] !== '') {
            return false;
        }
        if (isset($value['gas']) && QuantityValidator::validate($value['gas']) === false) {
            return false;
        }
        if (isset($value['gasPrice']) && QuantityValidator::validate($value['gasPrice']) === false) {
            return false;
        }
        if (isset($value['value']) && QuantityValidator::validate($value['value']) === false) {
            return false;
        }
        // if (!isset($value['data'])) {
        //     return false;
        // }
        // if (HexValidator::validate($value['data']) === false) {
        //     return false;
        // }
        if (isset($value['data']) && HexValidator::validate($value['data']) === false) {
            return false;
        }
        if (isset($value['nonce']) && QuantityValidator::validate($value['nonce']) === false) {
            return false;
        }
        return true;
    }