From 51d3038d099d68466b45f5444aadde6f2b7262fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kenjy=20Thi=C3=A9bault?= Date: Fri, 10 Mar 2023 22:15:26 +0100 Subject: [PATCH] [Form] Improve exception for unsubmitted form --- src/Symfony/Component/Form/Form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Form/Form.php b/src/Symfony/Component/Form/Form.php index 9d6344c8695e6..851d56a46d647 100644 --- a/src/Symfony/Component/Form/Form.php +++ b/src/Symfony/Component/Form/Form.php @@ -646,7 +646,7 @@ public function isEmpty(): bool public function isValid(): bool { if (!$this->submitted) { - throw new LogicException('Cannot check if an unsubmitted form is valid. Call Form::isSubmitted() before Form::isValid().'); + 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()) { pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy