Skip to content

Commit 998929c

Browse files
committed
Update form.rst for flattened form errors
Updated to reflect the code.
1 parent 8c6e96a commit 998929c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

components/form.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -749,10 +749,11 @@ method to access the list of errors. It returns a
749749
// "firstName" field
750750
$errors = $form['firstName']->getErrors();
751751

752-
// a FormErrorIterator instance in a flattened structure
752+
// a FormErrorIterator instance including child forms in a flattened structure
753+
// use getOrigin() to determine the form causing the error
753754
$errors = $form->getErrors(true);
754755

755-
// a FormErrorIterator instance representing the form tree structure
756+
// a FormErrorIterator instance including child forms without flattening the output structure
756757
$errors = $form->getErrors(true, false);
757758

758759
Clearing Form Errors

0 commit comments

Comments
 (0)