In Laravel 8 I have this validation in RegisterRequest:
public function rules()
{
return [
'name' =>'required|max:255',
'email' =>'required|email|max:255|unique:users,email',
'mobile' =>'required|digits:11|unique:users,mobile',
'password' =>'required|confirmed|min:8|max:255'
];
}
The problem is that maybe the user entered the wrong email or maybe they entered someone else's email. I want to check if email exists only when the email is verified. How to do that?