Query for email address already existing
Use this code to check if there is a user with provided email.

$account = user_load_by_mail($email);

if ($account) {
  // Do something.
  $form_state-&gt;setError(....
}


Besides, as I know in standard registration form there is already such validation.