Skip to content

Commit ce99d4a

Browse files
KThiebaultfabpot
authored andcommitted
[Form] Improve exception for unsubmitted form
1 parent 2a7871c commit ce99d4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ public function isEmpty(): bool
646646
public function isValid(): bool
647647
{
648648
if (!$this->submitted) {
649-
throw new LogicException('Cannot check if an unsubmitted form is valid. Call Form::isSubmitted() before Form::isValid().');
649+
throw new LogicException('Cannot check if an unsubmitted form is valid. Call Form::isSubmitted() and ensure that it\'s true before calling Form::isValid().');
650650
}
651651

652652
if ($this->isDisabled()) {

0 commit comments

Comments
 (0)