how to use validation in laravel?
ReportQuestion
2 years ago 655 views
You can also define custom error messages in laravel validation.
$validatedData = $request->validate([
'name' => 'required',
'password' => 'required|min:5',
'email' => 'required|email|unique:users'
], [
'name.required' => 'Name is required',
'password.required' => 'Password is required'
]);
Thread Reply