Untitled

mail@pastecode.io avatar
unknown
php
2 years ago
393 B
2
Indexable
Never
$rules = [
            'email' => 'required|email'
        ];

        $messages = [
            'required' => 'The :attribute field is required.',
        ];

        $validator = validator($request->all(), $rules, $messages);

        if($validator->passes()) {
            dd($validator->validated());
        } else if($validator->fails()) {
            dd($validator->errors());
        }