Laravel 验证表单自定消息写那里?
- 我是直接在store()调用表单验证的,例如
public function store(Requests\HrFormRequest $request)
- 这样调用表单验证,怎么去自定义错误消息呢?
文档里写的
$messages = [
'email.required' => 'We need to know your e-mail address!',
];
这个$messages应该放那里..因为是在store()的参数直接调用表单验证,所以不知道放那里.
推荐文章: