Keep authentication in sync with compliance verification

Many frameworks such as Laravel do not offer any suggestions on how to do validation. This is clear from the backend framework.

But it would be nice to provide a preliminary javascript check in advance so that users can immediately see if something is wrong when they fill out the form.

I know how to do validation on a server with something like Laravel, and I know how to do it on an interface with javascript. The problem that arises is that many frameworks do not cross this interface / backend border, but I need to keep them validated in synchronization with eachother.

I can’t have validation errors on the interface that no longer apply to backend validation. How do people deal with this?

As a rule, people just do authentication and transfer flash memory or errors to the user and just skip the compliance check? I feel that trying to keep the validation for the interface and backend the same can be error prone and work quite a bit.

Edit

Although this question already has an answer, I would like more information about it. What people use, custom solutions or thoughts on how to effectively solve this problem are welcome.

+4
source share
1 answer

You can sync it yourself. Pass the laravel validation rules for review and process them. Here are some examples.

, . - . , .

https://dotdev.co/form-validation-using-vue-js-2-35abd6b18c5d#.q0r9nkibc

, . validate=true, . , , .. + . js-, .

+1

Source: https://habr.com/ru/post/1669833/


All Articles