Why after such a check is always "you are registered" ? What's wrong?
if (!((isEmailValid(email) || (isPasswordValid(password)) || (isNameValid(name))))) { Toast.makeText(getActivity(), "Wrong email/password", Toast.LENGTH_SHORT).show(); } else { Toast.makeText(getActivity(), "\n" + "You are registered", Toast.LENGTH_SHORT).show(); } private boolean isEmailValid(String email) { return (email.contains("@") && email.length() > 5); } private boolean isNameValid(String name) { return name.length() >= 3; } private boolean isPasswordValid(String password) { return password.length() > 6; }
"You are registered". If the email, password and name are both wrong, then there will be a"Wrong email/password". And why in this text there is not a hint of perhaps the wrong name - I do not understand. Imagine what the user will be if he enters the correct email and password, and he will get the error"Wrong email/password"because of an invalid name. - Regent