Skip to content

Instantly share code, notes, and snippets.

@le0nidas
Created August 25, 2019 13:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save le0nidas/b567fc9c9da2607d900aff17023420e3 to your computer and use it in GitHub Desktop.
Save le0nidas/b567fc9c9da2607d900aff17023420e3 to your computer and use it in GitHub Desktop.
sealed class EmailAddress
data class ValidEmailAddress(val value: String) : EmailAddress()
data class InvalidEmailAddress(val value: String, val error: String): EmailAddress()
sealed class Password
data class ValidPassword(val value: String) : Password()
data class InvalidPassword(val value: String, val error: String): Password()
data class Token(val value: String)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment