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 #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 optional
0 commit comments