Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel validation custom message

$this->validate([ // 1st array is field rules
  'userid' =>'required|min:3|max:100',
  'username' =>'required|min:3',
  'password' =>'required|max:15|confirmed',
], [ // 2nd array is the rules custom message
  'required' => 'The :attribute field is mandatory.'
], [ // 3rd array is the fields custom name
  'userid' => 'User ID'
]);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #validation #custom #message
ADD COMMENT
Topic
Name
6+4 =