Sanitize/validate a given filename
Usage
// basic usage
$bool = $wireUpload->validateFilename(string $value);
// usage with all arguments
$bool = $wireUpload->validateFilename(string $value, array $extensions = []);
Arguments
Name | Type(s) | Description |
---|---|---|
value | string | Filename |
extensions (optional) | array | Allowed file extensions |
Return value
bool
string
Returns boolean false if invalid or string of potentially modified filename if valid
WireUpload methods and properties
API reference based on ProcessWire core version 3.0.236