Browse Source

Fix incorrect doc blocks.

Refs #5190
Mark Story 11 years ago
parent
commit
3f4e79d495
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/Validation/Validator.php

+ 3 - 3
src/Validation/Validator.php

@@ -401,12 +401,12 @@ class Validator implements \ArrayAccess, \IteratorAggregate, \Countable {
  * }}}
  *
  * 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';
  * });
  * }}}
  *