From b4c203e97c77a781ba3b7d38c35b56c2ab9f34dd Mon Sep 17 00:00:00 2001 From: tabbi89 Date: Wed, 29 Nov 2017 21:39:50 +0100 Subject: [PATCH] Update without_class.rst `$form->isValid()` no validation is done here this method only returns bool flag if any errors occurred during validation or false if a form was not submitted. Validation happens when executing `handleRequest()` or `submit()`. --- form/without_class.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/form/without_class.rst b/form/without_class.rst index 7b2f108c56a..4906e726594 100644 --- a/form/without_class.rst +++ b/form/without_class.rst @@ -63,7 +63,7 @@ an array. Adding Validation ~~~~~~~~~~~~~~~~~ -The only missing piece is validation. Usually, when you call ``$form->isValid()``, +The only missing piece is validation. Usually, when you call ``$form->handleRequest($request)``, the object is validated by reading the constraints that you applied to that class. If your form is mapped to an object (i.e. you're using the ``data_class`` option or passing an object to your form), this is almost always the approach