Skip to content
Tomer Gabel edited this page May 4, 2015 · 3 revisions

Modules

Accord comprises the following modules:

accord-api

The API only defines the validator and result model and doesn't contain any logic. This is the bare minimum required to accept, evaluate and reason about the results of a validator, and is not normally useful by itself. It has no dependencies.

accord-core

The core module provides the meat of Accord: a library of combinators (discrete bits that can be composed to define validation rules), a DSL providing a very concise syntax for defining validators, and a transformation macro to enable even terser syntax (by combining multiple validation rules into a single cohesive validator and autogenerating descriptions for objects under validation).

Accord depends on the Scala reflection library (scala-reflect), but only at compile time: this is not a transitive dependency, so it won't be included in your own project. This is the module you typically need to define validators.

accord-scalatest

This module provides ScalaTest matchers that enable you to easily match validation results against failure/success expectations. See ScalaTest Integration. for more information.

accord-specs2

This module provides Specs² matchers that enable you to easily match validation results against failure/success expectations. See Specs² Integration for more information.

accord-spring3

This module provides facilities for integrating Accord validators in an existing Spring application via Spring Validation. See Spring Integration for more information.

Build system

Accord uses sbt as its build tool of choice. The generated artifacts are deployed to the Maven Central Repository with associated POMs, so you can use them freely from a Maven project (or any compatible build system).