PageRenderTime 97ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/domain/src/main/java/domain/com/base/EmailValidator.kt

https://bitbucket.org/wliberda/fotommvvmcleanarchitecture
Kotlin | 12 lines | 7 code | 2 blank | 3 comment | 0 complexity | 94eb811da5f111a2b51c1e14828c1457 MD5 | raw file
  1. package domain.com.base
  2. import java.util.regex.Pattern
  3. /**
  4. * Created by wojciechliberda on 18/02/2018.
  5. */
  6. interface EmailValidator {
  7. val VALID_EMAIL_ADDRESS_REGEX: Pattern
  8. get() = Pattern.compile("^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", Pattern.CASE_INSENSITIVE)!!
  9. fun validate(emailStr: String): Boolean
  10. }