Yiisoft\Validator\Rule\File size validation placeholders currently expose raw byte counts.
Example:
new File(
maxSize: 50 * 1024 * 1024,
tooBigMessage: "{file} is larger than {limit}.",
)
{limit} resolves to 52428800, which is not convenient for user-facing upload validation messages.
Preferred behavior: use the same existing placeholders, but format size values in a human-readable way:
{limit} -> 50 MB
{exactly} -> 50 MB
This would let applications use Yii Validator defaults/placeholders without duplicating byte-to-readable-size formatting in application code.
Yiisoft\Validator\Rule\Filesize validation placeholders currently expose raw byte counts.Example:
{limit}resolves to52428800, which is not convenient for user-facing upload validation messages.Preferred behavior: use the same existing placeholders, but format size values in a human-readable way:
{limit}->50 MB{exactly}->50 MBThis would let applications use Yii Validator defaults/placeholders without duplicating byte-to-readable-size formatting in application code.