@laravelandme Hi, first of all you don't need to split the code like that. Just use one validation rule, because the validator will fail on the first rule and continue. To use custom messages you can set them as a third argument in your validator:
$validation = Validator::make($request->all(), [
'Name' => 'required|unique:users,name',
'Email' => 'required|unique:users,email',
'Date_of_birth' => 'required|date_format:"Ymd"',
'Code' => 'required|exists:codes,name'
'Name.required' => 'Missing input in the Name',
'Email.required' => 'Missing input in Email'
'*.unique' => 'Invalid input'
I hope this clears things up. Then in your conditional you can check the errors for a missing input error or for invalid input error etc.
I would really suggest to not use custom messages unless really necessary.