mirror of
https://github.com/Respect/Validation.git
synced 2024-06-01 21:32:14 +02:00
10df3211f5
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
37 lines
601 B
Markdown
37 lines
601 B
Markdown
# 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)
|
|
- [Image](Image.md)
|
|
- [Mimetype](Mimetype.md)
|
|
- [Readable](Readable.md)
|
|
- [Size](Size.md)
|
|
- [SymbolicLink](SymbolicLink.md)
|
|
- [Uploaded](Uploaded.md)
|
|
- [Writable](Writable.md)
|