String
import android.util.Patterns
/**
* [String.isValidEmail()]
* Check for a Valid Email address
*
* @return whether the input is valid for email address
*/
fun String.isValidEmail(): Boolean {
val pattern = Patterns.EMAIL_ADDRESS
val isEmail = pattern.matcher(this).matches()
return this.isNotEmpty() && isEmail
}
About 1 min