title: How to fix the error "the email address is badly formatted" in firebase authentication?
body: <p>I'm adding reset password in my app, every thing goes ok, but when i it tried to test it a toast showed to me with this message "the email address is badly formatted"?</p>
  
  <p>I tried to change input type to textEmailAddress bud doesn't work</p>
  
  <pre><code>public class ResetPasswordActivity extends AppCompatActivity {
  
  
      EditText resetPassword;
      Button resetbtn;
      ProgressBar resetBar;
      FirebaseAuth firebaseAuth;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_reset_password);
  
        resetPassword =findViewById(R.id.emailreset);
         resetBar = findViewById(R.id.resetbar);
         resetbtn = findViewById(R.id.resetbtn);
          resetBar.setVisibility(View.GONE);
  
          firebaseAuth = firebaseAuth.getInstance();
  
  
          resetbtn.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                  resetBar.setVisibility(View.VISIBLE);
  
                  firebaseAuth.sendPasswordResetEmail(resetPassword.toString()).addOnCompleteListener(new OnCompleteListener&lt;Void&gt;() {
                      @Override
                      public void onComplete(@NonNull Task&lt;Void&gt; task) {
                          resetBar.setVisibility(View.GONE);
  
                          if (task.isSuccessful()){
                              Toast.makeText(ResetPasswordActivity.this,"Password sent to your Email",Toast.LENGTH_LONG).show();
                          }else{
                              Toast.makeText(ResetPasswordActivity.this,task.getException().getMessage(),Toast.LENGTH_LONG).show();
                          }
                      }
                  });
              }
          });
      }
  }
  </code></pre>