Skip to content

Commit

Permalink
Fix incorrect examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jun 12, 2018
1 parent 7bf88ff commit 2482145
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Datasource/EntityTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit 2482145

Please sign in to comment.