Packages

p

examples

validation

package validation

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. case class Person (gender: Option[String], experience: Int) extends Product with Serializable
  2. case class SchoolClass (pupils: Int, teacher: Person) extends Product with Serializable

Value Members

  1. object CollectErrors extends App
  2. object CrossFieldValidation extends App

    This example shows how to apply cross-field validation rules for the request using a for comprehensions and the "Extraction" construct.

    This example shows how to apply cross-field validation rules for the request using a for comprehensions and the "Extraction" construct. The comprehension returns an Extracted, or ExtractionFailed instance. Note that the Extractables can be nested in other Extractables, which allows for re-use and compartmentalisation of validation logic.

    In this example, we implement a checker for school class sizes.. the rule being that the number of pupils in a class must be greater than their teacher's years of experience.

Ungrouped