I
I
igordata12020-06-02 14:42:10
Laravel
igordata1, 2020-06-02 14:42:10

How to check where the error is in the validation?

public function store(Request $request)
    {
        $this->validate($request, [
            'age' => 'required|min:18',
            'fio'   =>  'required|max:120|not_in:about',
            'about'  =>  'required|not_in:fio|max:1000',
        ]);
        dd("stop");
        $post = User::add($request->all());
        $post->$request->post('fio');
        $post->$request->post('age');
        $post->$request->post('about');
        $post->save();
        return redirect()->route('sttings');
    }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
part_os, 2020-06-18
@part_os

The latest version can be viewed here. Describe what problem you are facing? It's not clear from the message.
https://laravel.com/docs/7.x/validation#working-wi...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question