You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minor #49667 [Form] Improve exception for unsubmitted form (KThiebault)
This PR was squashed before being merged into the 6.3 branch.
Discussion
----------
[Form] Improve exception for unsubmitted form
| Q | A
| ------------- | ---
| Branch? | 6.3
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix#49619
| License | MIT
| Doc PR | -
This PR improves the error message when a form is submitted but its submission is not verified.
Commits
-------
51d3038 [Form] Improve exception for unsubmitted form
Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Form.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -646,7 +646,7 @@ public function isEmpty(): bool
646
646
publicfunctionisValid(): bool
647
647
{
648
648
if (!$this->submitted) {
649
-
thrownewLogicException('Cannot check if an unsubmitted form is valid. Call Form::isSubmitted() before Form::isValid().');
649
+
thrownewLogicException('Cannot check if an unsubmitted form is valid. Call Form::isSubmitted() and ensure that it\'s true before calling Form::isValid().');
0 commit comments