Caution
The documentation you are viewing is for an older version of this component.
Switch to the latest (v3) version.
File Validators
File Validation Classes
Laminas comes with a set of classes for validating both files and uploaded files, such as file size validation and CRC checking.
- Count
- crc32
- ExcludeExtension
- ExcludeMimeType
- Exists
- Extension
- FilesSize
- Hash
- ImageSize
- IsCompressed
- IsImage
- Md5
- MimeType
- NotExists
- Sha1
- Size
- Upload
- UploadFile
- WordCount
Validation argument
All the File validators' isValid()
methods support both a file path string
or a $_FILES
array as the supplied argument.
When a $_FILES
array is passed in, the tmp_name
is used for the file path.