Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information