Answers for "add error message to $this->validate laravel"

PHP
1

get message validator failed laravel

$errors = $validator->errors()->getMessages();
Posted by: Guest on May-19-2021
9

laravel validator make custom message

$rules = [
        'name' => 'required',
        'email' => 'required|email',
        'message' => 'required|max:250',
    ];

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

    $this->validate($request, $rules, $customMessages);
Posted by: Guest on May-06-2020

Code answers related to "add error message to $this->validate laravel"

Browse Popular Code Answers by Language