respect-validation/docs/File.md
Henrique Moody 2a2e1d577e
Change how documentation of rules are presented
Rules are not always used from the alias `v`, neither called staticaly.
2017-03-27 17:26:21 +02:00

568 B

File

  • File()

Validates files.

v::file()->validate(__FILE__); // true
v::file()->validate(__DIR__); // false

This validator will consider SplFileInfo instances, so you can do something like:

v::file()->validate(new \SplFileInfo($file));

See also: