Skip to content

Instantly share code, notes, and snippets.

@NTCoding
Created February 13, 2016 12:28
Show Gist options
  • Select an option

  • Save NTCoding/47d5c0c9d4fe7504481d to your computer and use it in GitHub Desktop.

Select an option

Save NTCoding/47d5c0c9d4fe7504481d to your computer and use it in GitHub Desktop.
lazy val form = Form(mapping(
"name" -> nonEmptyText,
"age" -> number,
"favouriteColour" -> mandatoryIf(
isEqual("name", "Francoise") and isEqual("age", "21"),
nonEmptyText
)
)(Model.apply)(Model.unapply))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment