Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel validation custom message example

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

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

    $this->validate($request, $rules, $customMessages);
//@sujay
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #validation #custom #message
ADD COMMENT
Topic
Name
7+7 =