Try out the live demo on CodeSandbox to get an idea for how the API works, or to quickly verify your use case:
Superstruct's API is very flexible, allowing it to be used for a variety of use cases on your servers and in the browser. Here are a few examples of common patterns...
- Basic Validation
- Custom Types
- Default Values
- Optional Values
- Composing Structs
- Throwing Errors
- Returning Errors
- Testing Values
- Custom Errors
Read the getting started guide to familiarize yourself with how Superstruct works. After that, check out the full API reference for more detailed information about structs, types and errors...

