Skip to content

Instantly share code, notes, and snippets.

@hadilq
Created January 10, 2021 23:02
Show Gist options
  • Save hadilq/e6b180aa365ff7b89525c9bdf000633f to your computer and use it in GitHub Desktop.
Save hadilq/e6b180aa365ff7b89525c9bdf000633f to your computer and use it in GitHub Desktop.
validate DSL
validate() elseIf {
InvalidEmailAddress { errorMessage: String ->
/* handle failure */
}
EmptySubject { errorMessage: String -> /* handle failure */ }
EmptyBody { errorMessage: String -> /* handle failure */ }
}
@truongpham1007
Copy link

Yeah !, i love it. <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment