Releases: nonamephp/php7-common
Releases · nonamephp/php7-common
Collection: Get multiple items by key
An array of keys can be passed to get()
to retrieve multiple items from the collection as an array.
0.3.0
- Added
addType()
which allows custom types to be defined. - Types can now extend other types, allowing for more complex rule configuration.
- Changed closure/callable validator signature from
($name, $value, $validator)
to($value, $rule, $validator)
to match built-in validator signatures better. The name of the field is available through$rule['name']
. - Dropped closure validator type (e.g.
isClosure()
).
0.2.8
0.2.7
- Rules may now be a closure/callable or you can pass a
validator
key equal to a closure/callable along with your rule array. See issue #4 for more information. required
is set totrue
by default for rules whererequired
is not set. You may override this value per rule by settingrequired
equal tofalse
.- Added new
any
type that always returns true.