Commit 23ff699
committed
minor #1443 Fix comment stating isSubmitted is optional (smnandre)
This PR was merged into the main branch.
Discussion
----------
Fix comment stating isSubmitted is optional
The isSubmitted() _must_ be called before
[src/Symfony/Component/Form/Form.php](https://github.com/symfony/symfony/blob/6637b78a4fcba7cef818f2a022e096d503690ac5/src/Symfony/Component/Form/Form.php#L646-L657)
```php
public function isValid(): bool
{
if (!$this->submitted) {
throw new LogicException('Cannot check if an unsubmitted form is valid. Call Form::isSubmitted() and ensure that it\'s true before calling Form::isValid().');
}
if ($this->isDisabled()) {
return true;
}
return 0 === \count($this->getErrors(true));
}
```
Commits
-------
6da03aa Fix comment stating isSubmitted is optional1 file changed
+2
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
90 | | - | |
91 | | - | |
| 89 | + | |
| 90 | + | |
92 | 91 | | |
93 | 92 | | |
94 | 93 | | |
| |||
0 commit comments