diff --git a/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/HomeOwnerEditProfile.java b/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/HomeOwnerEditProfile.java index 17aea06..09741d6 100644 --- a/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/HomeOwnerEditProfile.java +++ b/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/HomeOwnerEditProfile.java @@ -56,7 +56,8 @@ public class HomeOwnerEditProfile extends AppCompatActivity { TextView password = findViewById(R.id.PasswordInput); //Checks for the fields - if(firstname.getText().toString().length()>0 + if((password.getText().toString().length()>=5 || password.getText().toString().equals("")) + && firstname.getText().toString().length()>0 && lastname.getText().toString().length()>0 && password.getText().toString().matches("[a-zA-Z0-9]*") && firstname.getText().toString().matches("[a-zA-Z]*") diff --git a/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/ServiceProviderEditProfile.java b/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/ServiceProviderEditProfile.java index e91ee49..11eae79 100644 --- a/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/ServiceProviderEditProfile.java +++ b/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/ServiceProviderEditProfile.java @@ -74,7 +74,8 @@ public class ServiceProviderEditProfile extends AppCompatActivity { CheckBox licensed = findViewById(R.id.LicensedInput); //Checks for the fields - if(firstname.getText().toString().length()>0 + if((password.getText().toString().length()>=5 || password.getText().toString().equals("")) + && firstname.getText().toString().length()>0 && lastname.getText().toString().length()>0 && companyname.getText().toString().length()>0 && address.getText().toString().length()>0 && phonenumber.getText().toString().length()>0 && password.getText().toString().matches("[a-zA-Z0-9]*")