PageRenderTime 55ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

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

https://bitbucket.org/wliberda/fotommvvmcleanarchitecture
Kotlin | 16 lines | 8 code | 5 blank | 3 comment | 0 complexity | 1665e9c6f391530513fe6847df9060ec 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. class EmailValidatorImpl: EmailValidator{
  7. override fun validate(emailStr: String): Boolean =
  8. VALID_EMAIL_ADDRESS_REGEX.matcher(emailStr).run {
  9. this.find()
  10. }
  11. }