mirror of
https://github.com/Respect/Validation.git
synced 2026-03-17 23:59:51 +01:00
Also add integration test for Type rule. Signed-off-by: Paul Karikari <paulkarikari1@gmail.com> Co-Authored-By: Henrique Moody <henriquemoody@gmail.com>
773 B
773 B
Type
Type(string $type)
Validates the type of input.
v::type('bool')->validate(true); // true
v::type('callable')->validate(function (){}); // true
v::type('object')->validate(new stdClass()); // true
Changelog
| Version | Description |
|---|---|
| 2.0.0 | Became case-sensitive |
| 0.8.0 | Created |
See also: