From 7cba1b21ad9dceabe62b644dd5f28e62c30575bc Mon Sep 17 00:00:00 2001 From: Mary Tran Date: Sun, 2 Dec 2018 11:45:17 -0500 Subject: [PATCH] Put back validation and allowed for empty password --- .../uottawa/olympus/olympusservices/HomeOwnerEditProfile.java | 3 ++- .../olympus/olympusservices/ServiceProviderEditProfile.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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]*")