validators\FileValidator $maxSize

$maxSize public property The maximum number of bytes required for the uploaded file. Defaults to null, meaning no limit. Note, the size limit is also affected by upload_max_filesize and post_max_size INI setting and the 'MAX_FILE_SIZE' hidden field value. See getSizeLimit() for details. See also: http://php.net/manual/en/ini.core.php#ini.upload-max-filesize http://php.net/post-max-size getSizeLimit() $tooBig for the customized message for a file that is too big. public integer $maxSize =

validators\FileValidator $extensions

$extensions public property A list of file name extensions that are allowed to be uploaded. This can be either an array or a string consisting of file extension names separated by space or comma (e.g. "gif, jpg"). Extension names are case-insensitive. Defaults to null, meaning all file name extensions are allowed. See also $wrongExtension for the customized message for wrong file type. public array|string $extensions = null

validators\FileValidator $checkExtensionByMimeType

$checkExtensionByMimeType public property Whether to check file type (extension) with mime-type. If extension produced by file mime-type check differs from uploaded file extension, the file will be considered as invalid. public boolean $checkExtensionByMimeType = true

validators\FileValidator $maxFiles

$maxFiles public property The maximum file count the given attribute can hold. Defaults to 1, meaning single file upload. By defining a higher number, multiple uploads become possible. Setting it to 0 means there is no limit on the number of files that can be uploaded simultaneously. Note: The maximum number of files allowed to be uploaded simultaneously is also limited with PHP directive max_file_uploads, which defaults to 20. See also: http://php.net/manual/en/ini.core.php#ini.max-file-

validators\ExistValidator init()

init() public method Initializes the object. This method is invoked at the end of the constructor after the object is initialized with the given configuration. public void init ( )

validators\ExistValidator validateAttribute()

validateAttribute() public method Validates a single attribute. Child classes must implement this method to provide the actual validation logic. public void validateAttribute ( $model, $attribute )$model yii\base\Model The data model to be validated $attribute string The name of the attribute to be validated.

validators\ExistValidator validateValue()

validateValue() protected method Validates a value. A validator class can implement this method to support data validation out of the context of a data model. protected array|null validateValue ( $value )$value mixed The data value to be validated. return array|null The error message and the parameters to be inserted into the error message. Null should be returned if the data is valid. throws yii\base\NotSupportedException if the validator does not supporting data validation withou

validators\ExistValidator createQuery()

createQuery() protected method Creates a query instance with the given condition. protected yii\db\ActiveQueryInterface createQuery ( $targetClass, $condition )$targetClass string The target AR class $condition mixed Query condition return yii\db\ActiveQueryInterface The query instance

validators\ExistValidator $filter

$filter public property Additional filter to be applied to the DB query used to check the existence of the attribute value. This can be a string or an array representing the additional query condition (refer to yii\db\Query::where() on the format of query condition), or an anonymous function with the signature function ($query), where $query is the Query object that you can modify in the function. public string|array|Closure $filter = null

validators\ExistValidator $targetClass

$targetClass public property The name of the ActiveRecord class that should be used to validate the existence of the current attribute value. It not set, it will use the ActiveRecord class of the attribute being validated. See also $targetAttribute. public string $targetClass = null