-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Form] Introduced proxy methods to allow easier handling of form errors #29521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
3cffa28
3ea76c8
60df1f3
44363fb
9084db4
79bea84
fd2eaee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,6 +103,24 @@ public function all(); | |
*/ | ||
public function getErrors($deep = false, $flatten = true); | ||
|
||
/** | ||
* Returns the list of the current form and all child forms. | ||
* | ||
* @return FormErrorIterator An iterator over the {@link FormError} | ||
* instances that where added to the form | ||
* and the child forms | ||
*/ | ||
public function getAllErrors(); | ||
|
||
/** | ||
* Returns the list of this form only - without child errors. | ||
* | ||
* @return FormErrorIterator An iterator over the {@link FormError} | ||
* instances that where added to the top | ||
* level of this form | ||
*/ | ||
public function getOnlyGlobalErrors(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The name sounds confusing for a form which is not the root. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was trying to stick with the naming in the current documentation:
But |
||
|
||
/** | ||
* Updates the form with default data. | ||
* | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cannot change the interface until Symfony 5.0 for BC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually totally forgot about that part and agree. I've changed the description.