Skip to content

Instantly share code, notes, and snippets.

@jwalgemoed
Last active September 14, 2018 08:14
Show Gist options
  • Save jwalgemoed/6c5b4bd2b511deb74c5ebee4cc11e2bb to your computer and use it in GitHub Desktop.
Save jwalgemoed/6c5b4bd2b511deb74c5ebee4cc11e2bb to your computer and use it in GitHub Desktop.
data class User(val name: String?, val email: String?) {
fun isValid() = !name.isNullOrBlank() && name.length > 3
&& !email.isNullOrBlank() && email.length > 3
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment