Answers for "laravel validation custom message array"

PHP
1

laravel validation array

$data = $request->validate([
    "name"    => "required|array|min:3",
    "name.*"  => "required|string",
]);
Posted by: Guest on June-08-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 "laravel validation custom message array"

Browse Popular Code Answers by Language