I am validating a user registration form
for EX: (Requests validation class)
class UserCreateAccountRequest extends Request
{
public function authorize()
{
return true;
}
public function rules()
{
return [
'email' => 'required|unique:users,email',
'password' => 'required|min:6|max:32'
];
}
}
If the email is already registered I want to redirect to the password reset page.
How can i achieve this using request validation class without putting the validation in to the controller?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire