M
M
MrChen2016-07-28 03:24:25
Laravel
MrChen, 2016-07-28 03:24:25

How to separate errors in Laravel?

Hello! On my site, registration and authorization are on the same page. My question is: how not to separate the errors? That is, in Laravel all errors come in an array with the same name .... How to deal with this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton, 2016-07-28
@Yadalay

Create your own array in the controller and pass it to the template.

V
Vyacheslav Plisko, 2016-07-28
@AmdY

You have one page, and two forms, so only one will be validated. Add a hidden form_name field. On the server, check it and run the desired set of validators. In the template, also add a check.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question