From 3a4a0e54ebe74734556762b683a8f61e21f5ef11 Mon Sep 17 00:00:00 2001 From: Jerome Roethlisberger Date: Mon, 16 Sep 2013 16:13:58 +0200 Subject: [PATCH] Improved wording of Model::invalidFields() Inspired by http://book.cakephp.org/2.0/en/models/data-validation/validating-data-from-the-controller.html#validating-data-from-the-controller --- lib/Cake/Model/Model.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/Cake/Model/Model.php b/lib/Cake/Model/Model.php index 50d9d6a23..950eeaa72 100644 --- a/lib/Cake/Model/Model.php +++ b/lib/Cake/Model/Model.php @@ -3142,10 +3142,13 @@ class Model extends Object implements CakeEventListener { } /** - * Returns an array of fields that have failed validation. On the current model. + * Returns an array of fields that have failed the validation of the current model. + * + * Additionally it populates the validationErrors property of the model with the same array. * * @param string $options An optional array of custom options to be made available in the beforeValidate callback - * @return array Array of invalid fields + * @return array Array of invalid fields and its error messages + * * @see Model::validates() */ public function invalidFields($options = array()) {