Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel validation custom message

public function store()
{
    request()->validate([
        'file' => 'required',
        'type' => 'required'
    ],
    [
        'file.required' => 'You have to choose the file!',
        'type.required' => 'You have to choose type of the file!'
    ]);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #validation #custom #message
ADD COMMENT
Topic
Name
6+3 =