File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
src/Symfony/Component/Form/Tests/Extension/Validator/Constraints Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 11<?php
22
3+ /*
4+ * This file is part of the Symfony package.
5+ *
6+ * (c) Fabien Potencier <fabien@symfony.com>
7+ *
8+ * For the full copyright and license information, please view the LICENSE
9+ * file that was distributed with this source code.
10+ */
11+
312namespace Symfony \Component \Form \Tests \Extension \Validator \Constraints ;
413
514use PHPUnit \Framework \TestCase ;
@@ -142,10 +151,15 @@ public function testCascadeValidationToChildFormsUsingPropertyPathsValidatedInSe
142151 'constraints ' => [new NotBlank (['groups ' => 'group1 ' ])],
143152 'property_path ' => '[foo] ' ,
144153 ])
154+ ->add ('field2 ' , null , [
155+ 'constraints ' => [new NotBlank (['groups ' => 'group2 ' ])],
156+ 'property_path ' => '[bar] ' ,
157+ ])
145158 ;
146159
147160 $ form ->submit ([
148161 'field1 ' => '' ,
162+ 'field2 ' => '' ,
149163 ]);
150164
151165 $ violations = $ this ->validator ->validate ($ form );
Original file line number Diff line number Diff line change 2525use Symfony \Component \Form \FormInterface ;
2626use Symfony \Component \Form \SubmitButtonBuilder ;
2727use Symfony \Component \Translation \IdentityTranslator ;
28- use Symfony \Component \Validator \Constraints \Collection ;
2928use Symfony \Component \Validator \Constraints \GroupSequence ;
3029use Symfony \Component \Validator \Constraints \NotBlank ;
3130use Symfony \Component \Validator \Constraints \NotNull ;
You can’t perform that action at this time.
0 commit comments