Browse Source

doc block update

Paweł Kukiełka 10 years ago
parent
commit
219f22aa60
1 changed files with 8 additions and 1 deletions
  1. 8 1
      src/Validation/Validator.php

+ 8 - 1
src/Validation/Validator.php

@@ -422,7 +422,14 @@ class Validator implements ArrayAccess, IteratorAggregate, Countable
     }
 
     /**
-     * Sets whether a field is required to be present in data array.
+     * Sets whether a field is required to be present in data array. You can also pass array.
+     * Using an array will let you provide the following keys:
+     *
+     * - `mode` individual mode for field
+     * - `message` individual error message for field
+     *
+     * You can also set mode and message for all passed fields, the individual settings
+     * takes precedence over group setting.
      *
      * @param string|array $field the name of the field
      * @param bool|string|callable $mode Valid values are true, false, 'create', 'update'.