Overview

Classes

  • Quform
  • Quform_Admin_InsertForm
  • Quform_Admin_Page
  • Quform_Admin_Page_Controller
  • Quform_Admin_Page_Dashboard
  • Quform_Admin_Page_Entries
  • Quform_Admin_Page_Entries_Edit
  • Quform_Admin_Page_Entries_List
  • Quform_Admin_Page_Entries_View
  • Quform_Admin_Page_Factory
  • Quform_Admin_Page_Forms_Add
  • Quform_Admin_Page_Forms_Edit
  • Quform_Admin_Page_Forms_List
  • Quform_Admin_Page_Help
  • Quform_Admin_Page_Preview
  • Quform_Admin_Page_Settings
  • Quform_Admin_Page_Tools
  • Quform_Admin_Page_Tools_ExportEntries
  • Quform_Admin_Page_Tools_ExportForm
  • Quform_Admin_Page_Tools_Home
  • Quform_Admin_Page_Tools_ImportForm
  • Quform_Admin_Page_Tools_Migrate
  • Quform_Admin_Page_Tools_Uninstall
  • Quform_Api
  • Quform_Block
  • Quform_Builder
  • Quform_Captcha
  • Quform_ClassLoader
  • Quform_Confirmation
  • Quform_Container
  • Quform_Dashboard_Widget
  • Quform_Dispatcher
  • Quform_Element
  • Quform_Element_Captcha
  • Quform_Element_Checkbox
  • Quform_Element_Column
  • Quform_Element_Container
  • Quform_Element_Container_Iterator
  • Quform_Element_Date
  • Quform_Element_Email
  • Quform_Element_Factory
  • Quform_Element_Field
  • Quform_Element_File
  • Quform_Element_Group
  • Quform_Element_Hidden
  • Quform_Element_Honeypot
  • Quform_Element_Html
  • Quform_Element_Multi
  • Quform_Element_Multiselect
  • Quform_Element_Name
  • Quform_Element_Page
  • Quform_Element_Password
  • Quform_Element_Radio
  • Quform_Element_Recaptcha
  • Quform_Element_Row
  • Quform_Element_Select
  • Quform_Element_Submit
  • Quform_Element_Text
  • Quform_Element_Textarea
  • Quform_Element_Time
  • Quform_Entry_Controller
  • Quform_Entry_Exporter
  • Quform_Entry_List_Settings
  • Quform_Entry_List_Table
  • Quform_Entry_Processor
  • Quform_Entry_UserSearcher
  • Quform_Filter_Abstract
  • Quform_Filter_Alpha
  • Quform_Filter_AlphaNumeric
  • Quform_Filter_Digits
  • Quform_Filter_Regex
  • Quform_Filter_Static
  • Quform_Filter_StripTags
  • Quform_Filter_Trim
  • Quform_Form
  • Quform_Form_Controller
  • Quform_Form_Exporter
  • Quform_Form_Factory
  • Quform_Form_Importer
  • Quform_Form_Iterator
  • Quform_Form_List_Settings
  • Quform_Form_List_Table
  • Quform_Form_Processor
  • Quform_License
  • Quform_Migrator
  • Quform_NonceRefresher
  • Quform_Notification
  • Quform_Notification_Resender
  • Quform_Options
  • Quform_Permissions
  • Quform_Repository
  • Quform_ScriptLoader
  • Quform_Session
  • Quform_Settings
  • Quform_Shortcode
  • Quform_Themes
  • Quform_TokenReplacer
  • Quform_Toolbar
  • Quform_Translations
  • Quform_Updater
  • Quform_Upgrader
  • Quform_Uploader
  • Quform_Validator_Abstract
  • Quform_Validator_Alpha
  • Quform_Validator_AlphaNumeric
  • Quform_Validator_Array
  • Quform_Validator_Captcha
  • Quform_Validator_Date
  • Quform_Validator_Digits
  • Quform_Validator_Duplicate
  • Quform_Validator_Email
  • Quform_Validator_FileUpload
  • Quform_Validator_GreaterThan
  • Quform_Validator_Honeypot
  • Quform_Validator_Identical
  • Quform_Validator_InArray
  • Quform_Validator_Length
  • Quform_Validator_LessThan
  • Quform_Validator_Recaptcha
  • Quform_Validator_Regex
  • Quform_Validator_Required
  • Quform_Validator_Static
  • Quform_Validator_Time
  • Quform_View
  • Quform_ViewFactory
  • Quform_Widget_Form
  • Quform_Widget_Popup

Interfaces

  • Quform_Attachable
  • Quform_Element_Editable
  • Quform_Filter_Interface
  • Quform_Validator_Interface
  • Overview
  • Class

Class Quform_Validator_FileUpload

Quform_Validator_Abstract implements Quform_Validator_Interface
Extended by Quform_Validator_FileUpload
Copyright: Copyright (c) 2009-2022 ThemeCatcher (https://www.themecatcher.net)
Located at Quform/Validator/FileUpload.php
Methods summary
public
# __construct( array $options = array() )

Parameters

$options

Throws

InvalidArgumentException
If the name option is not given in the $options

Overrides

Quform_Validator_Abstract::__construct()
public boolean
# isValid( array $value )

Returns true if and only if the uploaded file is free of errors

Returns true if and only if the uploaded file is free of errors

Parameters

$value
The element value (array of files)

Returns

boolean
protected string
# setFileUploadError( integer $errorCode, string $filename = '' )

Set the error message corresponding to the error code generated by PHP file uploads and this validator

Set the error message corresponding to the error code generated by PHP file uploads and this validator

Parameters

$errorCode
The error code
$filename
The filename to add to the message

Returns

string
The error message
protected boolean
# isUploadedFile( string $filename )

Has the file been uploaded via PHP or the enhanced uploader?

Has the file been uploaded via PHP or the enhanced uploader?

Parameters

$filename
The path to the file

Returns

boolean
protected boolean
# isAllowedFileType( string $filename )

Determines if the file type is allowed by WP core

Determines if the file type is allowed by WP core

Parameters

$filename

Returns

boolean
public static array|string
# getMessageTemplates( string|null $key = null )

Get all message templates or the single message with the given key

Get all message templates or the single message with the given key

Parameters

$key

Returns

array|string
public static array
# getDefaultConfig( string|null $key = null )

Get the default config for this validator

Get the default config for this validator

Parameters

$key
Get the config by key, if omitted the full config is returned

Returns

array
Methods inherited from Quform_Validator_Abstract
config(), createMessage(), error(), getMessage(), getTranslation(), reset(), setConfig(), setMessage()
Constants summary
string REQUIRED
# 'fileUploadRequired'
string NUM_REQUIRED
# 'fileNumRequired'
string TOO_MANY
# 'fileTooMany'
string TOO_BIG_FILENAME
# 'fileTooBigFilename'
string TOO_BIG
# 'fileTooBig'
string NOT_ALLOWED_TYPE_FILENAME
# 'fileNotAllowedTypeFilename'
string NOT_ALLOWED_TYPE
# 'fileNotAllowedType'
string NOT_UPLOADED_FILENAME
# 'fileNotUploadedFilename'
string NOT_UPLOADED
# 'fileNotUploaded'
string ONLY_PARTIAL_FILENAME
# 'fileOnlyPartialFilename'
string ONLY_PARTIAL
# 'fileOnlyPartial'
string NO_FILE
# 'noFile'
string MISSING_TEMP_FOLDER
# 'fileMissingTempFolder'
string FAILED_TO_WRITE
# 'fileFailedToWrite'
string STOPPED_BY_EXTENSION
# 'fileStoppedByExtension'
string UNKNOWN_ERROR
# 'fileUnknownError'
string BAD_FORMAT
# 'fileBadFormat'
integer UPLOAD_ERR_TYPE
# 128
integer UPLOAD_ERR_FILE_SIZE
# 129
integer UPLOAD_ERR_NOT_UPLOADED
# 130
Properties inherited from Quform_Validator_Abstract
$config, $message
API documentation generated by ApiGen