validators\InlineValidator $clientValidate

$clientValidate public property An anonymous function or the name of a model class method that returns the client validation code. The signature of the method should be like the following: function foo($attribute, $params) { return "javascript"; } where $attribute refers to the attribute name to be validated. Please refer to clientValidateAttribute() for details on how to return client validation code. public string|Closure $clientValidate = null

validators\ImageValidator 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 ( $file )$file 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 without a model

validators\ImageValidator validateImage()

validateImage() protected method Validates an image file. protected array|null validateImage ( $image )$image yii\web\UploadedFile Uploaded file passed to check against a set of rules 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.

validators\ImageValidator 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\ImageValidator getClientOptions()

getClientOptions() protected method Returns the client-side validation options. protected array getClientOptions ( $model, $attribute )$model yii\base\Model The model being validated $attribute string The attribute name being validated return array The client-side validation options

validators\ImageValidator clientValidateAttribute()

clientValidateAttribute() public method Returns the JavaScript needed for performing client-side validation. You may override this method to return the JavaScript validation code if the validator can support client-side validation. The following JavaScript variables are predefined and can be used in the validation code: attribute: an object describing the the attribute being validated. value: the value being validated. messages: an array used to hold the validation error messages for the

validators\ImageValidator $underWidth

$underWidth public property The error message used when the image is under $minWidth. You may use the following tokens in the message: {attribute}: the attribute name {file}: the uploaded file name {limit}: the value of $minWidth public string $underWidth = null

validators\ImageValidator $underHeight

$underHeight public property The error message used when the image is under $minHeight. You may use the following tokens in the message: {attribute}: the attribute name {file}: the uploaded file name {limit}: the value of $minHeight public string $underHeight = null

validators\ImageValidator $overWidth

$overWidth public property The error message used when the image is over $maxWidth. You may use the following tokens in the message: {attribute}: the attribute name {file}: the uploaded file name {limit}: the value of $maxWidth public string $overWidth = null

validators\ImageValidator $overHeight

$overHeight public property The error message used when the image is over $maxHeight. You may use the following tokens in the message: {attribute}: the attribute name {file}: the uploaded file name {limit}: the value of $maxHeight public string $overHeight = null