I downloaded the link package to perform cpf validation on my system. I followed the documentation instructions by putting the ValidatorProvider in app.php.
In my system of registration, I would like only valid CPFs to be saved. However, I did not understand how to proceed with this validation in the RegisterController. I tried the following:
protected function validator(array $data)
{
return Validator::make($data, [
'cpf' => 'formato_cpf',
'name' => 'required|string|max:255',
'email' => 'required|string|email|max:255|unique:users',
'password' => 'required|string|min:6|confirmed',
]);
}
But it did not work. As much as I put an invalid cpf I still can do the registration in the system. What am I doing wrong?