src/Forms/FormBuilder.php
protected function validateOptions(array $options, FieldTypeInterface $field)
    {
        $parsed = [];

        foreach ($options as $key => $value) {
            if (! in_array($key, $field->getAllowedOptions(), true)) {
                throw new \DomainException('The "'.$key.'" option is not allowed on the provided field.');
            }

            $parsed[$key] = $value;
        }

        return $parsed;
    }
protected function validateOptions(array $options, FieldTypeInterface $field)
    {
        $parsed = [];

        foreach ($options as $key => $value) {
            if (! in_array($key, $field->getAllowedOptions(), true)) {
                throw new \DomainException('The "'.$key.'" option is not allowed on the provided field.');
            }

            $parsed[$key] = $value;
        }

        return $parsed;
    }
protected function validateOptions ( array $ options , FieldTypeInterface $ field ) { $ parsed = [ ] ; foreach ( $ options as $ key => $ value ) { if ( ! in_array ( $ key , $ field -> getAllowedOptions ( ) , true ) ) { throw new \ DomainException ( 'The "' . $ key . '" option is not allowed on the provided field.' ) ; } $ parsed [ $ key ] = $ value ; } return $ parsed ; }
Validate the "options" used by a field instance.

@param array $options

@return array
Validate the options used by a field instance .