Commit 8b9503b6 authored by Sam's avatar Sam

Commit v5

parent 15e5a682
......@@ -106,21 +106,35 @@ public class register extends AppCompatActivity implements View.OnClickListener
setParams(ErrorMessageFirstname);
ErrorMessageFirstname.setText(message);
}
else{
ResetParams(ErrorMessageFirstname);
}
if (lastname.length() < 3) {
message = getString(R.string.reister_lastname);
setParams(ErrorMessageLastname);
ErrorMessageLastname.setText(message);
}
else{
ResetParams(ErrorMessageLastname);
}
if (username.length() < 5) {
message = getString(R.string.reister_username);
setParams(ErrorMessageuserName);
ErrorMessageuserName.setText(message);
}
else{
ResetParams(ErrorMessageuserName);
}
if (password.length() < 7) {
message = getString(R.string.reister_password);
setParams(ErrorMessagepassword);
ErrorMessagepassword.setText(message);
}
else{
ResetParams(ErrorMessagepassword);
}
if (!password.equals(password2) || password2.length() < 7) {
message = getString(R.string.reister_password2);
setParams(ErrorMessagepassword2);
......@@ -128,10 +142,6 @@ public class register extends AppCompatActivity implements View.OnClickListener
} else {
ResetParams(ErrorMessageFirstname);
ResetParams(ErrorMessageLastname);
ResetParams(ErrorMessageuserName);
ResetParams(ErrorMessagepassword);
ResetParams(ErrorMessagepassword2);
addAccount(firstname, lastname, username, password);
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment