src/Forms/Form.php
protected function validateOptions(array $options)
    {
        $validated = [];

        foreach ($options as $name => $option) {
            if (! in_array($name, $this->getAllowedOptions())) {
                throw new DomainException('The "'.$name.'" option is not allowed on the provided form.');
            }

            $validated[$name] = $option;
        }

        return $validated;
    }
protected function validateOptions(array $options)
    {
        $validated = [];

        foreach ($options as $name => $option) {
            if (! in_array($name, $this->getAllowedOptions())) {
                throw new DomainException('The "'.$name.'" option is not allowed on the provided form.');
            }

            $validated[$name] = $option;
        }

        return $validated;
    }
protected function validateOptions ( array $ options ) { $ validated = [ ] ; foreach ( $ options as $ name => $ option ) { if ( ! in_array ( $ name , $ this -> getAllowedOptions ( ) ) ) { throw new DomainException ( 'The "' . $ name . '" option is not allowed on the provided form.' ) ; } $ validated [ $ name ] = $ option ; } return $ validated ; }
Validate form options.

@param array $options

@return array
Validate form options .