title: How is the Correct Validation?
body: <p><strong>Correct me if my Validation is wrong</strong></p>
  
  <pre><code>    if (sqlName.getText().toString().length() == 0) {
          sqlName.setError("Name is required!");
      } else if (sqlAge.getText().toString().length() == 0) {
          sqlAge.setError("Age is required!");
      }else if(statusbutton.getText().toString().length() == 0){
          statusbutton.setError("Please Select Status before you Proceed");
      }else if (sqlcycle.getText().toString().length() == 0) {
          sqlcycle.setError("Cycle Lenght is required!");
      }else if (sqlperiod.getText().toString().length() == 0) {
          sqlperiod.setError("Period is required!");
      }
  } catch (Exception e) {
      didItWork = false;
      String error = e.toString();
      Dialog d = new Dialog(this);
      d.setTitle("FACK");
      TextView tv = new TextView(this);
      tv.setText(error);
      d.setContentView(tv);
      d.show();
  } finally {
      if (didItWork) {
          Toast.makeText(Main.this, "USER Information has been Save", 1000).show();
      } 
      else {
          Intent main = new Intent(this, CalendarMain.class);
          startActivity(main);
          finish();
      }
  }
  </code></pre>
  
  <p>Problem: I want to vaidate first the before it move to the next activity
  but still even though the edittext is empty it still go to next activity.</p>