Simple, reusable and composable validation
Specma is a Javascript library to validate any type of value against a simple, reusable and composable spec.
- Collection specs defined with the exact same shape as the value!
- Based on predicate functions of type
true || "reason"
- Composable specs with intuitive
and
/or
operators - Easy cross-validation between multiple fields
- User defined customized invalid reasons
- Async validation out of the box
- Very small footprint