H
H
happ2017-08-30 00:39:29
Laravel
happ, 2017-08-30 00:39:29

How to implement data validation in laravel on the server side and passing the response to the form?

There is a form Form(Laravel Collective). When sending to the server using ajax, validation occurs on the server side. If there are errors, you need to return the response and display them in the form.
As I understand it, using a js framework, for example vue.js, will look good, of course you can do without it. How does the response return using vue.js or another framework and how to implement it, what can you read on this topic?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vlad Palchikov, 2017-08-30
@vlad_palchikov

There is a very simple way to solve this problem - https://github.com/proengsoft/laravel-jsvalidation
You only need to create your own request for each form, and not validate it in the controller.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question