4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Form\Extension\Validator\Type
;
14 use Symfony\Component\Form\AbstractTypeExtension
;
15 use Symfony\Component\OptionsResolver\Options
;
16 use Symfony\Component\OptionsResolver\OptionsResolverInterface
;
19 * @author Bernhard Schussek <bschussek@gmail.com>
21 class RepeatedTypeValidatorExtension
extends AbstractTypeExtension
26 public function setDefaultOptions(OptionsResolverInterface
$resolver)
28 // Map errors to the first field
29 $errorMapping = function (Options
$options) {
30 return array('.' => $options['first_name']);
33 $resolver->setDefaults(array(
34 'error_mapping' => $errorMapping,
41 public function getExtendedType()