jeudi 20 juillet 2017

catch laravel errorbag $erros in jquery

How can i catch the laravel errorbag in javascript an showing with the sweetalert or something similar. Has onyone tried?

I was thinking catch the variable $errors in a hidden input then with jquery handle it with sweet alert. I am not sure how to do it

This is the from blade

ViewErrorBag {#217 ▼
  #bags: array:1 [▼
    "default" => MessageBag {#218 ▼
      #messages: array:1 [▼
        "searchWord" => array:1 [▼
          0 => "The search word field is required when none of vehicle type / transport type / price / out county / out date are present."
        ]
      ]
      #format: ":message"
    }
  ]
}



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2vGu33W
via IFTTT

Aucun commentaire:

Enregistrer un commentaire