diff --git a/app/src/main/java/com/example/chan24/smartplanner/RegisterActivity.java b/app/src/main/java/com/example/chan24/smartplanner/RegisterActivity.java index 10d30a186495f37e3e6baeb49879526dca1e8859..2354046c7a073e1c718e6e5c1fa6a4efd1e7556e 100644 --- a/app/src/main/java/com/example/chan24/smartplanner/RegisterActivity.java +++ b/app/src/main/java/com/example/chan24/smartplanner/RegisterActivity.java @@ -49,12 +49,17 @@ public class RegisterActivity extends AppCompatActivity { Toast.makeText(getApplicationContext(),"Enter Name",Toast.LENGTH_SHORT).show(); return; } - else if (p.isEmpty()){ + if (p.isEmpty()){ Toast.makeText(getApplicationContext(),"Enter Password",Toast.LENGTH_SHORT).show(); return; } - else if (m.isEmpty()){ + if (p.length()<6){ + Toast.makeText(getApplicationContext(),"Password must have greater than 6 characters",Toast.LENGTH_SHORT).show(); + return; + } + + if (m.isEmpty()){ Toast.makeText(getApplicationContext(),"Enter Password",Toast.LENGTH_SHORT).show(); return; }