Validates the collection.

@param  array   $options Validates option.
@return boolean
978662
public function validates($options = [])
    {
        $success = true;
        foreach ($this as $entity) {
            if (!$entity->validates($options)) {
                $success = false;
            }
        }
        return $success;
    }
577511
protected function validateOptions(int $options)
    {
        // Forbidden combos.
        $combos = [
            self::ABSOLUTE_DISABLED | self::ABSOLUTE_ALLOWED,
            self::ABSOLUTE_DISABLED | self::ABSOLUTE_REQUIRED,
            self::VFS_ALLOWED | self::ABSOLUTE_ALLOWED,
            self::VFS_ALLOWED | self::ABSOLUTE_REQUIRED,
            self::VFS_DISABLED | self::VFS_ALLOWED,
            self::VFS_DISABLED | self::VFS_REQUIRED,
            self::VFS_REQUIRED | self::ABSOLUTE_ALLOWED,
            self::VFS_REQUIRED | self::ABSOLUTE_REQUIRED,
            self::WRAPPER_DISABLED | self::VFS_ALLOWED,
            self::WRAPPER_DISABLED | self::VFS_REQUIRED,
            self::WRAPPER_DISABLED | self::WRAPPER_ALLOWED,
            self::WRAPPER_DISABLED | self::WRAPPER_REQUIRED
        ];
        /** @noinspection ForeachSourceInspection */
        foreach ($combos as $combo) {
            if (($options & $combo) === $combo) {
                $mess = 'Can not use required or allowed options together with corresponding disabled option';
                throw new \DomainException($mess);
            }
        }
    }
799080
public static function invoke(
        array $validatorOptions,
        array $options
    ): array {
        $fieldConfig = Property::getArray(
            $options,
            static::OPTION_FIELD_CONFIG
        );

        if (empty($fieldConfig)) {
            return $validatorOptions;
        }

        $validatorOptions[self::VALIDATOR_OPTION_FIELD_CONFIG] = $fieldConfig;

        return $validatorOptions;
    }
184432
protected function validateOptions($options)
    {
        foreach ($options as $key => $value) {
            if (!in_array($key, $this->allowed_options)) {
                throw new FilestackException("Invalid policy option: $key:$value", 400);
            }
        }

        return true;
    }
957218
public function fromArray($options)
    {
        if (isset($options['Index'])) {
            Validate::isInteger($options['Index'], 'options[Index]');
            $this->_index = (int) $options['Index'];
        }

        if (isset($options['Language'])) {
            Validate::isString($options['Language'], 'options[Language]');
            $this->_language = $options['Language'];
        }
    }
769914
public function isValid($value = null, array $options = []): bool
    {
        if (\count($options) > 0) {
            $this->setOptions($options);
        }
        $this->setValue($value);
        $this->errors = [];

        switch ($this->options['type']) {
            case 'equals':
                $isValid = $this->validateEquals();
                break;
            case 'lower-than':
                $isValid = $this->validateLowerThan();
                break;
            case 'greater-than':
                $isValid = $this->validateGreaterThan();
                break;
            default:
                $isValid = $this->validateEquals();
                break;
        }

        return $isValid;
    }
743762
public function isValid($value = null, array $options = []): bool
    {
        if (\count($options) > 0) {
            $this->setOptions($options);
        }
        $this->setValue($value);
        $this->errors = [];

        $validIP = $this->validateIPNumber();
        $validPrivRange = $this->validatePrivateRange();
        $validResRange = $this->validateReservedRange();

        return $validIP && $validPrivRange && $validResRange;
    }
713183
public function allowedValues(array $choices): Validator
    {
        return $this->assertCallback(
            function ($value) use ($choices) {
                return in_array($value, $choices);
            },
            'is not an allowed value'
        );
    }
1310559
private function resolveOptions(array $options)
    {
        if (!$this->optionsResolver) {
            $this->optionsResolver = new OptionsResolver();

            $this->optionsResolver->setDefaults([
                'validation_groups' => null,
                'constraints' => null,
                'constraints_extra' => null
            ]);
        }

        return $this->optionsResolver->resolve($options);
    }
793373
public function fromArray(array $options)
    {
        if (isset($options['Id'])) {
            Validate::isString($options['Id'], 'options[Id]');
            $this->_id = $options['Id'];
        }

        if (isset($options['State'])) {
            Validate::isInteger($options['State'], 'options[State]');
            $this->_state = $options['State'];
        }

        if (isset($options['Created'])) {
            Validate::isDateString($options['Created'], 'options[Created]');
            $this->_created = new \DateTime($options['Created']);
        }

        if (isset($options['LastModified'])) {
            Validate::isDateString(
                $options['LastModified'],
                'options[LastModified]'
            );
            $this->_lastModified = new \DateTime($options['LastModified']);
        }

        if (isset($options['AlternateId'])) {
            Validate::isString($options['AlternateId'], 'options[AlternateId]');
            $this->_alternateId = $options['AlternateId'];
        }

        if (isset($options['Name'])) {
            Validate::isString($options['Name'], 'options[Name]');
            $this->_name = $options['Name'];
        }

        if (isset($options['Options'])) {
            Validate::isInteger($options['Options'], 'options[Options]');
            $this->_options = $options['Options'];
        }

        if (isset($options['Uri'])) {
            Validate::isValidUri($options['Uri'], 'options[Uri]');
            $this->_uri = $options['Uri'];
        }

        if (isset($options['StorageAccountName'])) {
            Validate::isString(
                $options['StorageAccountName'],
                'options[StorageAccountName]'
            );
            $this->_storageAccountName = $options['StorageAccountName'];
        }
    }
245788
public function save(array $options = [])
    {
        $this->validation = Arr::get($options, 'validation', $this->validation);

        if ($this->validation) {

            $attributes = $this->getAttributes();

            $validation = $this->validation($attributes);

            if ($validation instanceof MbValidation) {
                $validation->check(true);
                $attributes = $validation->getData();
            } elseif (is_array($validation)) {
                $attributes = $validation;
            }

            $this->fill($attributes);
        }

        return parent::save($options);
    }
580390
function validate($options = [])
    {
        $groups = @$options['groups'] ?: [];

        $this->errors = static::validator()->validate($this, $groups);

        return $this->errors->count() === 0;
    }
885650
public function fromArray(array $options)
    {
        if (isset($options['Name'])) {
            Validate::isString($options['Name'], 'options[Name]');
            $this->_name = $options['Name'];
        }

        if (isset($options['IsDefault'])) {
            Validate::isBoolean($options['IsDefault'], 'options[IsDefault]');
            $this->_isDefault = $options['IsDefault'];
        }
    }
686594
public function setOptions(array $options)
	{
		if (isset($options['type']))
		{
			$this->type = $options['type'];
		}

		if (isset($options['timeout']))
		{
			$this->timeout = $options['timeout'];
		}

		return true;
	}
693267
public function validateSettings(array &$submitted, array $options = array())
    {
        $this->options = $options;
        $this->submitted = &$submitted;

        $this->validateInitialPathSettings();
        $this->validateLimitSettings();
        $this->validateAccessSettings();
        $this->validateExtensionSettings();
        $this->validateFileSizeSettings();

        return $this->getResult();
    }
900119
public function validateOptions($name, $options)
	{
		if (is_string($options))
		{
			$name = $options;
			$options = array();
		}

		//if the name is not a string or the options is not an array at this point, throw an error because we can't do anything with it
		if (!is_string($name) || !is_array($options))
		{
			throw new \InvalidArgumentException("One of the fields in your " . $this->config->getOption('name') . " configuration file is invalid");
		}

		//in any case, make sure the 'column_name' option is set
		$options['field_name'] = $name;

		return $options;
	}
105138
protected function validateOptions(array $options)
    {
        foreach ($options as $option => $value) {
            if (!array_key_exists($option, $this->defaultOptions)) {
                throw new InvalidArgumentException(sprintf('Unrecognized option "%s".', $option));
            }
        }
        if (isset($options['use_grouping']) && !is_bool($options['use_grouping'])) {
            throw new InvalidArgumentException('The option "use_grouping" must be a boolean.');
        }
        foreach (['minimum_fraction_digits', 'maximum_fraction_digits'] as $option) {
            if (array_key_exists($option, $options) && !is_numeric($options[$option])) {
                throw new InvalidArgumentException(sprintf('The option "%s" must be numeric.', $option));
            }
        }
        $roundingModes = [
            PHP_ROUND_HALF_UP, PHP_ROUND_HALF_DOWN,
            PHP_ROUND_HALF_EVEN, PHP_ROUND_HALF_ODD, 'none',
        ];
        if (!empty($options['rounding_mode']) && !in_array($options['rounding_mode'], $roundingModes)) {
            throw new InvalidArgumentException(sprintf('Unrecognized rounding mode "%s".', $options['rounding_mode']));
        }
        if (!empty($options['style']) && !in_array($options['style'], ['decimal', 'percent'])) {
            throw new InvalidArgumentException(sprintf('Unrecognized style "%s".', $options['style']));
        }
    }