Skip to content

Message trans fix #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion locale/ru/spiral-validator-checker-filechecker.php
Original file line number Diff line number Diff line change
@@ -5,6 +5,6 @@
return [
'File does not exists.' => 'Файл не найден.',
'File not received, please try again.' => 'Не удалось получить файл, попробуйте еще раз.',
'File exceeds the maximum file size of {1}KB.' => 'Файл превышает допустимый размер {1}KB.',
'File exceeds the maximum file size of {1}KiB.' => 'Файл превышает допустимый размер {1}KiB.',
'File has an invalid file format.' => 'Неверное расширение файла.',
];
4 changes: 2 additions & 2 deletions src/Checker/FileChecker.php
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ final class FileChecker extends AbstractChecker
public const MESSAGES = [
'exists' => '[[File does not exists.]]',
'uploaded' => '[[File not received, please try again.]]',
'size' => '[[File exceeds the maximum file size of {1}KB.]]',
'size' => '[[File exceeds the maximum file size of {1}KiB.]]',
'extension' => '[[File has an invalid file format.]]',
];
public const ALLOW_EMPTY_VALUES = ['exists', 'uploaded'];
@@ -47,7 +47,7 @@ public function uploaded(mixed $file): bool
}

/**
* Check if file size less that specified value in KB.
* Check if file size less that specified value in KiB.
*
* @param mixed $file Local file or uploaded file array.
* @param int $size Size in KBytes.