Skip to content

Instantly share code, notes, and snippets.

@ryoppy
Last active August 29, 2015 14:06
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 ryoppy/0c92c5ff3f27401915d5 to your computer and use it in GitHub Desktop.
Save ryoppy/0c92c5ff3f27401915d5 to your computer and use it in GitHub Desktop.
play2 scala form
"foo" -> mapping(
"msg" -> text.transform[String](toLF, identity)
)(Foo.apply)(Foo.unapply)
def toLF(a: String): String = a.replaceAll("(\r\n|\r)","\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment