A validation DSL for Clojure and ClojureScript applications, providing composable validators and custom error messages.
Bouncer is a validation library for Clojure and ClojureScript applications that provides a domain-specific language (DSL) for defining and executing data validation rules. It allows developers to validate maps, nested structures, and collections with built-in and custom validators, ensuring data integrity in a flexible and composable way.
Clojure and ClojureScript developers building applications that require robust data validation, such as web APIs, form processing systems, or data transformation pipelines.
Developers choose Bouncer for its expressive DSL, support for nested validation, and easy customization of validators and error messages, all while maintaining a functional and composable design that fits well with Clojure ecosystems.
A validation DSL for Clojure & Clojurescript applications
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Validators can be defined as plain Clojure maps and composed together, enabling reusable validation logic for complex scenarios, as shown with address-validations and person-validator examples.
Supports validation of deeply nested associative structures using path-based keys (e.g., [:address :street]), allowing for intuitive validation of complex data without manual traversal.
Custom validators can be created using the defvalidator macro or plain functions, with support for arbitrary arguments, making it easy to implement business-specific rules.
Error messages are highly customizable per validator, including internationalization, and a message-fn allows access to validation metadata for sophisticated formatting.
The library ships with only a basic set of validators the author needed, requiring developers to build custom ones for many use cases, as admitted in the built-in validations section.
The README's TODO list includes fixing messy documentation, which can make onboarding and advanced usage more difficult for new users.
With the last stable release noted in 2019 and a TODO list mentioning fundamental improvements, the project may lack regular updates or community support.