com.wix

accord

package accord

The entry-point to the Accord library. To execute a validator, simply import it into the local scope, import this package and execute validate( objectUnderValidation ).

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. accord
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. case class Failure(violations: Set[Violation]) extends Result with Product with Serializable

    An object representing a failed validation result.

  2. case class GroupViolation(value: Any, constraint: String, description: Option[String], children: Set[Violation]) extends Violation with Product with Serializable

    Describes the violation of a group of constraints.

  3. sealed trait Result extends AnyRef

    A base trait for validation results.

  4. case class RuleViolation(value: Any, constraint: String, description: Option[String]) extends Violation with Product with Serializable

    Describes the violation of a validation rule or constraint.

  5. trait Validator[-T] extends (T) ⇒ Result

    A validator is a function T => Result, where T is the type of the object under validation and Result is an instance of com.wix.accord.Result.

  6. trait Violation extends AnyRef

    A base trait for all violation types.

Value Members

  1. object Implicits

    Provides alternative syntax for validation.

  2. object Success extends Result with Product with Serializable

    An object representing a successful validation result.

  3. object Validator

  4. def validate[T](x: T)(implicit validator: Validator[T]): Result

    Validates the specified object and returns a validation com.wix.accord.Result.

    Validates the specified object and returns a validation com.wix.accord.Result. An implicit com.wix.accord.Validator must be in scope for this call to succeed.

    T

    The type of the object to validate.

    x

    The object to validate.

    validator

    A validator for objects of type T.

    returns

    A com.wix.accord.Result indicating success or failure of the validation.

Inherited from AnyRef

Inherited from Any

Ungrouped