What problem does it solve?
Prevents invalid or unsafe request data from reaching business logic by providing a consistent, declarative validation system for ColdBox/BoxLang handlers and APIs.
Core Features & Use Cases
- Inline and shared constraints: Define per-handler rules or reuse shared constraint files for consistent validation across handlers and modules.
- Exception and manual flows: Support both validate() with manual error handling and validateOrFail() with ValidationException for REST APIs.
- Custom validators and integration: Add side-effect-free custom validators, enforce uniqueness via cborm, render errors in views, and return structured 422 JSON responses for API consumers.
Quick Start
Validate the incoming request with validateOrFail using your UserConstraints and catch ValidationException to return a 422 JSON response with field-level error messages.