Exemplo n.º 1
0
 /**
  * 初始化表单验证
  *
  * @param etUserName
  * @param etUserPwd
  * @param btLogin
  */
 public void initAvaidation(
     EditText etUserName,
     EditText etUserPwd,
     EditText checkCode,
     EditText ed_protocol,
     Button btLogin) {
   editTextValidator = new EditTextValidator(context);
   editTextValidator.setButton(btLogin);
   editTextValidator.add(new ValidationModel(etUserName, new UserPhoneValidation()));
   editTextValidator.add(new ValidationModel(etUserPwd, new PasswordValidation()));
   editTextValidator.add(new ValidationModel(checkCode, new CheckCodeValidation()));
   editTextValidator.add(new ValidationModel(ed_protocol, new EmptyValidation()));
   editTextValidator.execute();
 }
Exemplo n.º 2
0
 /**
  * 检查注册参数
  *
  * @return
  */
 public boolean checkInputParams() {
   return editTextValidator.validate();
 }