Commit 8b9503b6 authored by Sam's avatar Sam

Commit v5

parent 15e5a682
...@@ -106,21 +106,35 @@ public class register extends AppCompatActivity implements View.OnClickListener ...@@ -106,21 +106,35 @@ public class register extends AppCompatActivity implements View.OnClickListener
setParams(ErrorMessageFirstname); setParams(ErrorMessageFirstname);
ErrorMessageFirstname.setText(message); ErrorMessageFirstname.setText(message);
} }
else{
ResetParams(ErrorMessageFirstname);
}
if (lastname.length() < 3) { if (lastname.length() < 3) {
message = getString(R.string.reister_lastname); message = getString(R.string.reister_lastname);
setParams(ErrorMessageLastname); setParams(ErrorMessageLastname);
ErrorMessageLastname.setText(message); ErrorMessageLastname.setText(message);
} }
else{
ResetParams(ErrorMessageLastname);
}
if (username.length() < 5) { if (username.length() < 5) {
message = getString(R.string.reister_username); message = getString(R.string.reister_username);
setParams(ErrorMessageuserName); setParams(ErrorMessageuserName);
ErrorMessageuserName.setText(message); ErrorMessageuserName.setText(message);
} }
else{
ResetParams(ErrorMessageuserName);
}
if (password.length() < 7) { if (password.length() < 7) {
message = getString(R.string.reister_password); message = getString(R.string.reister_password);
setParams(ErrorMessagepassword); setParams(ErrorMessagepassword);
ErrorMessagepassword.setText(message); ErrorMessagepassword.setText(message);
} }
else{
ResetParams(ErrorMessagepassword);
}
if (!password.equals(password2) || password2.length() < 7) { if (!password.equals(password2) || password2.length() < 7) {
message = getString(R.string.reister_password2); message = getString(R.string.reister_password2);
setParams(ErrorMessagepassword2); setParams(ErrorMessagepassword2);
...@@ -128,10 +142,6 @@ public class register extends AppCompatActivity implements View.OnClickListener ...@@ -128,10 +142,6 @@ public class register extends AppCompatActivity implements View.OnClickListener
} else { } else {
ResetParams(ErrorMessageFirstname);
ResetParams(ErrorMessageLastname);
ResetParams(ErrorMessageuserName);
ResetParams(ErrorMessagepassword);
ResetParams(ErrorMessagepassword2); ResetParams(ErrorMessagepassword2);
addAccount(firstname, lastname, username, password); addAccount(firstname, lastname, username, password);
return false; 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