Created
January 10, 2021 22:58
-
-
Save hadilq/2c9d27d8624aae6063f2e70b6fb38904 to your computer and use it in GitHub Desktop.
The result of validate method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sealed class ValidationResult | |
data class ValidationSuccess(val email: Email): ValidationResult() | |
data class InvalidEmailAddress(val errorMessage: String): ValidationResult() | |
data class EmptySubject(val errorMessage: String): ValidationResult() | |
data class EmptyBody(val errorMessage: String): ValidationResult() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment