Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Laravel validation custom message

$messsages = [
              'email.required'=>'You cant leave Email field empty',
              'name.required'=>'You cant leave name field empty',
              'name.min'=>'The field has to be :min chars long',
			 ];

	$rules = [
              'email'=>'required|unique:content',
              'name'=>'required|min:3',
			];

$validator = Validator::make($request, $rules,$messsages);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Laravel #validation #custom #message
ADD COMMENT
Topic
Name
6+6 =