private boolean isValidField() {
   if (StringUtils.isNullOrEmpty(email)) {
     emailTextview.setError(getString(R.string.field_required));
     emailTextview.setFocusable(true);
     emailTextview.requestFocus();
     return false;
   }
   if (!StringUtils.isValidEmail(emailTextview.getText().toString(), false)) {
     emailTextview.setError(getString(R.string.field_validEmail));
     emailTextview.setFocusable(true);
     emailTextview.requestFocus();
     return false;
   }
   return true;
 }
Example #2
0
 public static boolean isValidPassword(String paswd, boolean pAllowBlank) {
   return (pAllowBlank && StringUtils.isNullOrEmpty(paswd) || paswd.length() < 8);
 }