How do I custom validate user registration for Laravel
on auth
default using php artisan make:auth
?
I need the following clause It is mandatory to enter the field CPF or CNPJ .
I found the validation of the registry, but, would you like to add this clause?
return Validator::make($data, [
'name' => 'required|string|max:255',
'email' => 'required|string|email|max:255|unique:users',
'password' => 'required|string|min:6|confirmed',
]);