2008-11-01 17:32:06 -04:00
|
|
|
|
2008-12-16 18:34:01 -05:00
|
|
|
package com.android.email;
|
2008-11-01 17:32:06 -04:00
|
|
|
|
2009-09-08 03:31:02 -04:00
|
|
|
import android.text.util.Rfc822Tokenizer;
|
2008-11-01 17:32:06 -04:00
|
|
|
import android.widget.AutoCompleteTextView.Validator;
|
|
|
|
|
2009-11-24 19:40:29 -05:00
|
|
|
public class EmailAddressValidator implements Validator
|
|
|
|
{
|
|
|
|
public CharSequence fixText(CharSequence invalidText)
|
|
|
|
{
|
2008-11-01 17:32:06 -04:00
|
|
|
return "";
|
|
|
|
}
|
|
|
|
|
2009-11-24 19:40:29 -05:00
|
|
|
public boolean isValid(CharSequence text)
|
|
|
|
{
|
2009-09-08 03:31:02 -04:00
|
|
|
return Rfc822Tokenizer.tokenize(text).length > 0;
|
2008-11-01 17:32:06 -04:00
|
|
|
}
|
|
|
|
}
|