EditText setError() with no message just the icon

Your code perfect to show icon only.

As EditText is show anything related to when it has focused. So just change your code to like that…

if (!emailmatcher.matches()) {
    email.requestFocus();
    email.setError("Invalid Email");  
}
if (!zipmatcher.matches()) {
    zipcode.requestFocus();
    zipcode.setError("Invalid ZipCode");                     
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)