Validate a file using FileValidator modules
Note that this is intended for validating file data, not file names.
IMPORTANT: This method returns NULL if it can't find a validator for the file. This does not mean the file is invalid, just that it didn't have the tools to validate it.
// basic usage $bool = $sanitizer->validateFile(string $filename); // usage with all arguments $bool = $sanitizer->validateFile(string $filename, array $options = );
Full path and filename to validate
When available, provide array with any one or all of the following:
Returns TRUE if valid, FALSE if not, or NULL if no validator available for given file type.
API reference based on ProcessWire core version 3.0.155