I wanted to ask for your help about how I can add validation to forms if routes are used rather than controllers. The code I use so far:
Route::post('/contact/submit', function (Request $request) {
validate($request,[
'FirstName'=>'required',
'LastName'=>'required',
'Age'=>'required'
]);
Also, how is it possible to add custom validation, for example, to ensure that instead of message "Name is required" just show "Please fill name field".