diff --git a/src/Symfony/Component/Form/Form.php b/src/Symfony/Component/Form/Form.php index 648eb33d39..29f8f58c5e 100644 --- a/src/Symfony/Component/Form/Form.php +++ b/src/Symfony/Component/Form/Form.php @@ -770,18 +770,15 @@ class Form implements \IteratorAggregate, FormInterface } /** - * Returns whether or not there are errors. + * Returns whether there are errors associated with this form. * - * @return Boolean true if form is bound and not valid + * @return Boolean * * @deprecated Deprecated since version 2.1, to be removed in 2.3. Count * {@link getErrors()} instead. */ public function hasErrors() { - // Don't call isValid() here, as its semantics are slightly different - // Forms are not valid if their children are invalid, but - // hasErrors() returns only true if a form itself has errors return count($this->errors) > 0; } diff --git a/src/Symfony/Component/Form/FormInterface.php b/src/Symfony/Component/Form/FormInterface.php index 2f78d155d9..69674a5271 100644 --- a/src/Symfony/Component/Form/FormInterface.php +++ b/src/Symfony/Component/Form/FormInterface.php @@ -168,7 +168,7 @@ interface FormInterface extends \ArrayAccess, \Traversable, \Countable public function addError(FormError $error); /** - * Returns whether the form is valid. + * Returns whether the form and all children are valid. * * @return Boolean */