Introducing Accord: a sane validation library for Scala

94 views
Skip to first unread message

Tomer Gabel

unread,
Nov 14, 2013, 12:25:57 PM11/14/13
to unders...@googlegroups.com

Accord is a validation library written in and for Scala. Compared to JSR 303 and Scalaz validation it aims to provide the following:

  • Composable: Because JSR 303 is annotation based, validation rules cannot be composed (annotations cannot receive other annotations as parameters). This is a real problem with some Scala features, for example Options or collections. Accord's validation rules are trivially composable.
  • Simple: Accord provides a dead-simple story for validation rule definition by leveraging macros, as well as the validation call site (see example below).
  • Self-contained: Accord is macro-based but completely self-contained, and consequently only relies on the Scala runtime and reflection libraries.
  • Integrated: Other than providing its own DSL and matcher library, Accord is intended to play well withHamcrest matchers, and fully integrate with Specs2 and ScalaTest.

Accord is work-in-progress and distributed under the Apache License, Version 2.0, which basically means you can use and modify it freely. Code and more info on GitHub: https://github.com/holograph/accord

Feedback, bug reports and improvements are welcome!

Reply all
Reply to author
Forward
0 new messages