Here we will use regular expression (regex) to validate email address using Kotlin programming language.

class EmailValidator {
    companion object {
        fun isEmailValid(email: String): Boolean {
            return Patterns.EMAIL_ADDRESS.toRegex().matches(email);


fun String.isValidEmail(): Boolean 
  = this.isNotEmpty() && 

Please feel free to comment if you have newer techniques as well as ask questions. And, yeah! If this post helps you please do share!

Happy coding!

Leave a Reply

Your email address will not be published. Required fields are marked *