Answer the question
In order to leave comments, you need to log in
[[+content_image]]
Is there a validation rule for the size of the uploaded file?
I uploaded pictures, but there is not enough check for size.
Is there already a validation rule for file size that could be added to the rules:
public function rules()
{
return [
[['imageFile'], 'file', 'extensions' => 'jpg, png, gif'],
];
}
public function rules()
{
return [
[['imageFile'], 'file', 'extensions' => 'jpg, png, gif', 'maxSize' => 1000000],
];
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question