From 24821454b1d148dc495b33df2ff7deb607872032 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Tue, 12 Jun 2018 15:15:24 -0400 Subject: [PATCH] Fix incorrect examples. --- src/Datasource/EntityTrait.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Datasource/EntityTrait.php b/src/Datasource/EntityTrait.php index bbcf29c34cb..6a83ecb12bd 100644 --- a/src/Datasource/EntityTrait.php +++ b/src/Datasource/EntityTrait.php @@ -934,7 +934,7 @@ public function getError($field) * * ``` * // Sets the error messages for multiple fields at once - * $entity->errors(['salary' => ['message'], 'name' => ['another message']); + * $entity->setErrors(['salary' => ['message'], 'name' => ['another message']); * ``` * * @param array $fields The array of errors to set. @@ -960,7 +960,7 @@ public function setErrors(array $fields, $overwrite = false) * * ``` * // Sets the error messages for a single field - * $entity->errors('salary', ['must be numeric', 'must be a positive number']); + * $entity->setError('salary', ['must be numeric', 'must be a positive number']); * ``` * * @param string $field The field to get errors for, or the array of errors to set.