docs/validators/Extension.md
Extension(string $extension)Validates if the file extension matches the expected one:
v::extension('png')->assert('image.png');
// Validation passes successfully
This validator is case-sensitive.
Extension::TEMPLATE_STANDARD| Mode | Template |
|---|---|
default | {{subject}} must have the {{extension}} extension |
inverted | {{subject}} must not have the {{extension}} extension |
| Placeholder | Description |
|---|---|
extension | |
subject | The validated input or the custom validator name (if specified). |
| Version | Description |
|---|---|
| 3.0.0 | Templates changed |
| 1.0.0 | Created |