Octopus

screenshot of Octopus

Scala library for boilerplate-free validation

Overview

Octopus is a Scala library for boilerplate-free validation. It provides a Validator type-class and a DSL for defining validation rules for user-defined types. Octopus can automatically derive validators for various standard Scala types and supports integration with Cats and Scalaz validation types. It also supports asynchronous predicates for complex validation rules.

Features

  • Boilerplate-free validation: Octopus allows for defining validation rules without additional boilerplate.
  • Composable DSL: Octopus provides a DSL for composing validation rules.
  • Automatic derivation: Octopus can automatically derive validators for case classes, tuples, sealed hierarchies, and standard Scala types.
  • Integration with Cats: Octopus provides additional modules for integration with Cats validation types.
  • Integration with Scalaz: Octopus provides additional modules for integration with Scalaz validation types.
  • Asynchronous validators: Octopus supports asynchronous predicates for validation rules that require external context.
  • Integration with other monads: Octopus allows for using other monad types for defining rules and obtaining results.

Summary

Octopus is a Scala library that provides a boilerplate-free approach to validation. It offers a composable DSL for defining validation rules and can automatically derive validators for various types. Octopus also supports integration with Cats and Scalaz validation types, asynchronous predicates for complex validation rules, and integration with other monads. With Octopus, performing validation in Scala becomes easier and more efficient.