android is valid email
import android.util.Patterns
val email: String = "[email protected]"
private fun String.isValidEmail(): Boolean {
return Patterns.EMAIL_ADDRESS.matcher(this).matches()
}
email.isValidEmail()
4.2
10
public static boolean isValidEmail(CharSequence target) {
return (!TextUtils.isEmpty(target) && Patterns.EMAIL_ADDRESS.matcher(target).matches());
}
Thank you!
10
0
3.5
4
String emailPattern = "[a-zA-Z0-9._-]+@[a-z]+\\.+[a-z]+";
if (_______.matches(emailPattern)) {
regfullname.setError("invalid email adress");
return false;
}
Thank you!
4
0
Are there any code examples left?
New code examples in category Kotlin
-
Kotlin 2022-03-27 09:55:32 kotlin split by uppercase
-
Kotlin 2022-03-27 09:40:17 var and val in kotlin
-
Kotlin 2022-03-20 04:10:23 kotlin Random()
-
Kotlin 2022-03-18 01:40:01 exported android manifest
-
Kotlin 2022-03-16 14:50:04 okhttp kotlin example
-
Kotlin 2022-03-16 06:25:02 coroutines kotlin android dependency
-
Kotlin 2022-03-14 19:05:24 arrayadapter spinner kotlin fragment
-
Kotlin 2022-03-07 05:30:37 spring boot kotlin
-
Kotlin 2022-03-06 07:05:06 kotlin scope functions
-
Kotlin 2022-02-28 04:15:02 handler kotlin