respect-validation/docs/rules/Extension.md

37 lines
601 B
Markdown
Raw Normal View History

# Extension
- `Extension(string $extension)`
Validates if the file extension matches the expected one:
```php
v::extension('png')->validate('image.png'); // true
```
This rule is case-sensitive.
## Categorization
- File system
## Changelog
Version | Description
--------|-------------
1.0.0 | Created
***
See also:
- [Directory](Directory.md)
- [Executable](Executable.md)
- [Exists](Exists.md)
- [File](File.md)
2018-12-11 13:31:50 +01:00
- [Image](Image.md)
- [Mimetype](Mimetype.md)
- [Readable](Readable.md)
- [Size](Size.md)
- [SymbolicLink](SymbolicLink.md)
- [Uploaded](Uploaded.md)
- [Writable](Writable.md)