Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel custom validation message

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

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

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