Skip to content

Commit

Permalink
Fix incorrect doc blocks.
Browse files Browse the repository at this point in the history
Refs #5190
  • Loading branch information
markstory committed Nov 19, 2014
1 parent 067f3a6 commit 3f4e79d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Validation/Validator.php
Expand Up @@ -401,12 +401,12 @@ public function allowEmpty($field, $when = true) {
* }}}
*
* It is possible to conditionally disallow emptiness on a field by passing a callback
* as a second argument. The callback will receive the validation context array as
* as the third argument. The callback will receive the validation context array as
* argument:
*
* {{{
* $validator->notEmpty('email', function ($context) {
* return $context['newRecord'] && $context['data']['role'] !== 'admin';
* $validator->notEmpty('email', 'Email is required', function ($context) {
* return $context['newRecord'] && $context['data']['role'] !== 'admin';
* });
* }}}
*
Expand Down

0 comments on commit 3f4e79d

Please sign in to comment.