Overview of Drops Library for Elixir Data Validation

88
clicks
Overview of Drops Library for Elixir Data Validation
Peter Solnica released a new Elixir library named Drops, aiming to simplify data validation. This library takes inspiration from the Ruby dry-rb libraries and translates similar concepts to Elixir. Drops introduces Contracts with Schema DSL to define the shape of data and validation rules ensuring type safety at the system's boundaries. The library enables precise casting and validation steps, generating detailed error messages on failed validations, and supports custom domain logic separations. Developers can atomize input maps based on the schema definitions, and the library's initial version v0.1.0 is already employed in production at valued.app to process millions of JSON payloads. Drops offers a potential future integration with Ecto schemas and Phoenix and has its source code available on GitHub along with its documentation.

© HashMerge 2024