Answer the question
In order to leave comments, you need to log in
Where can I see an example of using the ImageValidator class in Yii2?
I am making a mechanism for uploading photos to the server. Where can I see a practical example of using the ImageValidator class in Yii2? Preferably in conjunction with \yii\web\UploadedFile.
Answer the question
In order to leave comments, you need to log in
https://github.com/yiisoft/yii2/blob/master/docs/g...
[
// проверяет, что "primaryImage" - это валидное изображение с указанными размерами
['primaryImage', 'image', 'extensions' => 'png, jpg',
'minWidth' => 100, 'maxWidth' => 1000,
'minHeight' => 100, 'maxHeight' => 1000,
],
]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question