diff --git a/OlympusServices/.idea/caches/build_file_checksums.ser b/OlympusServices/.idea/caches/build_file_checksums.ser index c647582..423f278 100644 Binary files a/OlympusServices/.idea/caches/build_file_checksums.ser and b/OlympusServices/.idea/caches/build_file_checksums.ser differ diff --git a/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/SignUp.java b/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/SignUp.java index d4d8e38..fb74f50 100644 --- a/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/SignUp.java +++ b/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/SignUp.java @@ -33,7 +33,7 @@ public class SignUp extends AppCompatActivity { String lastname = ((EditText) findViewById(R.id.LastNameInput)).getText().toString(); MaterialSpinner spinner = findViewById(R.id.RoleInput); //TODO add message conditional to check if every EditText is filled up to standards - if(username.length()>=5 && password.length()>5 && firstname.length()>0 && lastname.length()>0 && username.matches("[a-zA-Z0-9]*") && password.matches("[a-zA-Z0-9]*") + if(username.length()>=5 && password.length()>=5 && firstname.length()>0 && lastname.length()>0 && username.matches("[a-zA-Z0-9]*") && password.matches("[a-zA-Z0-9]*") && firstname.matches("[a-zA-Z]*") && lastname.matches("[a-zA-Z]*")){ switch(spinner.getText().toString()){ case "Home Owner": @@ -60,7 +60,7 @@ public class SignUp extends AppCompatActivity { else if(firstname.length()==0 || lastname.length()==0 || username.length()==0 || password.length()==0){ Toast.makeText(this, "Fields cannot be empty", Toast.LENGTH_LONG).show(); } - else if (username.length()<=5 || password.length()<=5 ){ + else if (username.length()<5 || password.length()<5 ){ Toast.makeText(this, "Password and username must be longer than 4 characters", Toast.LENGTH_LONG).show(); } else{