阿伦SS
我正在使用cviebrock来验证laravel中的图像大小。那很好。但是我想自定义错误消息。
我创建了一个消息数组
$messages = array(
'image-size' => 'My custome message.',
);
并传递给
$validation = Validator::make(array($file => $fileObj), array($file => $rules), $messages);
但是那是行不通的。
-感谢阿伦
毁灭
您使用了错误的名称,该名称应带有下划线,例如
$messages = array(
'image_size' => 'My custome message.',
);
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
编辑于
我来说两句