Skip to content

Commit 3f4e79d

Browse files
committed
Fix incorrect doc blocks.
Refs #5190
1 parent 067f3a6 commit 3f4e79d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Validation/Validator.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -401,12 +401,12 @@ public function allowEmpty($field, $when = true) {
401401
* }}}
402402
*
403403
* It is possible to conditionally disallow emptiness on a field by passing a callback
404-
* as a second argument. The callback will receive the validation context array as
404+
* as the third argument. The callback will receive the validation context array as
405405
* argument:
406406
*
407407
* {{{
408-
* $validator->notEmpty('email', function ($context) {
409-
* return $context['newRecord'] && $context['data']['role'] !== 'admin';
408+
* $validator->notEmpty('email', 'Email is required', function ($context) {
409+
* return $context['newRecord'] && $context['data']['role'] !== 'admin';
410410
* });
411411
* }}}
412412
*

0 commit comments

Comments
 (0)