Laravel在内置验证期间不闪烁错误

时间:2019-01-14 16:16:45

标签: laravel

我在我的PHP项目中使用Laravel。接受POST请求时,我使用内置的验证功能。如果无法通过与Job:Process: stage: process image: logstash:6.5.4 dependencies: - Job:Getlogs script: - logstash -f config/logstash.conf 类似的功能来实现,则会传递错误。尽管如此,当我致电Session::flash时,它不会返回任何错误。

1 个答案:

答案 0 :(得分:1)

向您提供$errors时,它不仅是错误的数组,它实际上是Illuminate\Support\MessageBag的实例,并提供了一些检查错误是否存在的方法{{1} },访问特定错误$errors->any()或所有错误$errors->first('name')的过程中,请查看documentation以获得有关如何与此对象进行交互的更多详细信息。