@Override public void svalidate() throws LocalValidatorException { final String email = mEmailEdt.getText().toString(); if (email.isEmpty()) { throw new EmailException("Please type your email"); } if (!org.apache.commons.validator.routines.EmailValidator.getInstance().isValid(email)) { throw new EmailException("Your email format is incorrect"); } }
@Override public void update() { mEmailEdt.update(false); }
public EmailValidator(RubykoEditText pEmailEdt) { this.mEmailEdt = pEmailEdt; mEmailEdt.addValidator(this); vMap.put(mEmailEdt.getId(), mEmailEdt); }