Email Address Validation in Android on EditText [duplicate]
Java: public static boolean isValidEmail(CharSequence target) { return (!TextUtils.isEmpty(target) && Patterns.EMAIL_ADDRESS.matcher(target).matches()); } Kotlin: fun CharSequence?.isValidEmail() = !isNullOrEmpty() && Patterns.EMAIL_ADDRESS.matcher(this).matches() Edit: It will work On Android 2.2+ onwards !! Edit: Added missing ;