Z
Z
ZaurK2018-04-12 16:00:55
Yii
ZaurK, 2018-04-12 16:00:55

How can I replace the file size exceeded notification with MB?

I limit the size of the uploaded file to 1 Mb: 'maxSize' => 1024 *1
If it is exceeded, I get a warning "The file is too large. The size should not exceed 1.00 KiB."
How can I change this KiB to a more understandable MB?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Fedorov, 2018-04-12
@ZaurK

fixed:
Displays text if an error occurs precisely because of the size
https://www.yiiframework.com/doc/api/2.0/yii-valid...
there are blanks - you can substitute the size, name, format and name of the attribute in the text

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question