DWQA QuestionsLaravel custom validation?
kundan roy asked 4 years ago

$messages = [
‘builder_code.required’ => ‘Please enter builder code!’,
‘builder_code.exists’ => ‘Please enter valid builder code!’,
‘plan.required’ => ‘Please select project plan!’,
‘name.required’ => ‘Please enter project name!’,
‘location.required’ => ‘Please enter project location!’,
//’status_date.*.required’ => ‘Please enter project status!’,
];
$request->validate([
‘builder_code’ => ‘required’,
‘plan’=>’required’,
‘name’ => ‘required’,
‘location’ => ‘required’,
‘about_project’ => ‘required’,
‘builder_code’ => ‘required|exists:builders,builder_code’
// ‘status_date.*’ => ‘required’,
],$messages);