The configureOptions() method of the symfony form type can do many things, since it provides an OptionResolver object (relying on its own component see ) to configure its configuration.
In this case, you need to call $resolver->setNormalizer() ( see ), which does exactly what you want, it has the ability to determine once the others are installed and can be called.
When the converter normalizes your variant, it executes the called one, passing an array of all parameters as the first argument, and the set parameter value is normalized as the second argument:
// class CustomFormType extends \Symfony\Component\Form\Extension\Core\Type\AbstractType use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException; public function configureOptions(OptionsResolver $resolver) { $resolver->setDefault('some_option', 'default value'); // or many at once $resolver->setDefaults(array( 'some_option' => 0, 'range_condition' => null, ); // what you need $someOptionNormalizer = function (Options $options, $someOption) { $rangeCondition = $options['range_condition']; if (in_array($rangeCondition, range(2, 5))) { if (in_array($someOption, range(6, 9))) { return $someOption; } throw new InvalidOptionsException(sprintf('When "range_condition" is inferior or equal to 5, "some_option" should be between 6 and 9, but "%d" given.', $someOption)); } if (in_array($rangeCondition, range(10, 13))) { if (in_array($someOption, range(1000, 1005))) { return $someOption; } throw new InvalidOptionsException(sprintf('When "range_condition" is between 10 and 13, "some_option" should be between 1000 and 1005, but "%d" given.', $someOption)); } }; $resolver->setNormalizer('some_option', $someOptionNormalizer); // you can also do $resolver->setRequired('some_option'); $resolver->setAllowedTypes('some_option', array('integer')); $resolver->setAllowedTypes('range_condition', array('null', 'integer')); $resolver->setAllowedValues('some_option', array_merge(range(6, 9), range(1000, 1005))); $resolver->setAllowedValues('range_condition', array_merge(range(2, 5), range(10, 13))); // ... }